Skip to content

Commit

Permalink
Format (#50)
Browse files Browse the repository at this point in the history
* Ruff check

* Black check and ignore docs
  • Loading branch information
liamhuber authored Jan 6, 2025
1 parent 2e0c159 commit 85f5126
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,33 @@ include = [ "pyiron_module_template*",]

[tool.setuptools.dynamic.version]
attr = "pyiron_module_template.__version__"

[tool.ruff]
exclude = ["docs", "notebooks", "setup.py", "_version.py"]

[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = ["E501"] #ignore line-length violations

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports in init files -- we specify APIs this way

[tool.black]
extend-exclude = '''
(
^/docs
)
'''
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)
)
2 changes: 1 addition & 1 deletion tests/benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
Timed tests to make sure critical components stay sufficiently efficient.
"""
"""
2 changes: 1 addition & 1 deletion tests/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
Large and potentially slower tests to check how the pieces fit together.
"""
"""
2 changes: 1 addition & 1 deletion tests/integration/test_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ def test_void(self):
pass


if __name__ == '__main__':
if __name__ == "__main__":
unittest.main()
2 changes: 1 addition & 1 deletion tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
Small tests run, relatively fast tests for checking individual bits of the code base.
"""
"""
3 changes: 2 additions & 1 deletion tests/unit/test_tests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import unittest

import pyiron_module_template


class TestVersion(unittest.TestCase):
def test_version(self):
version = pyiron_module_template.__version__
print(version)
self.assertTrue(version.startswith('0'))
self.assertTrue(version.startswith("0"))

0 comments on commit 85f5126

Please sign in to comment.