Skip to content

Commit

Permalink
Format pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilGirdhar committed Apr 3, 2024
1 parent dfa6020 commit e1c592a
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 132 deletions.
9 changes: 5 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.{py,rst,yml}]
[*.{py,toml,tex}]
indent_style = space
end_of_line = lf
trim_trailing_whitespace = true
Expand All @@ -10,8 +10,9 @@ insert_final_newline = true
max_line_length = 100
indent_size = 4

[*.rst]
indent_size = 4
[*.toml]
max_line_length = 150
indent_size = 2

[*.yml]
[*.tex]
indent_size = 2
259 changes: 131 additions & 128 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@ build-backend = 'poetry.core.masonry.api'

[tool.poetry]
name = 'tjax'
version = "0.31.4"
description = "Tools for JAX."
version = '0.31.4'
description = 'Tools for JAX.'
license = 'MIT'
authors = ['Neil Girdhar <mistersheik@gmail.com>']
readme = 'README.rst'
repository = 'https://github.com/NeilGirdhar/tjax'
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
'Typing :: Typed',
'License :: OSI Approved :: MIT License']
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
'Typing :: Typed',
'License :: OSI Approved :: MIT License',
]

[tool.poetry.dependencies]
python = '>=3.10,<3.13'
Expand Down Expand Up @@ -62,77 +63,80 @@ disable = 'ignored-abstractmethod'
jobs = 0
py-version = '3.10'
load-plugins = [
'pylint.extensions.bad_builtin',
'pylint.extensions.broad_try_clause',
'pylint.extensions.check_elif',
'pylint.extensions.code_style',
'pylint.extensions.comparison_placement',
'pylint.extensions.confusing_elif',
'pylint.extensions.consider_refactoring_into_while_condition',
'pylint.extensions.consider_ternary_expression',
'pylint.extensions.dict_init_mutate',
'pylint.extensions.docparams',
'pylint.extensions.docstyle',
'pylint.extensions.dunder',
'pylint.extensions.empty_comment',
'pylint.extensions.eq_without_hash',
'pylint.extensions.for_any_all',
'pylint.extensions.magic_value',
'pylint.extensions.mccabe',
'pylint.extensions.no_self_use',
'pylint.extensions.overlapping_exceptions',
'pylint.extensions.private_import',
'pylint.extensions.redefined_loop_name',
'pylint.extensions.redefined_variable_type',
'pylint.extensions.set_membership',
'pylint.extensions.typing',
'pylint.extensions.while_used']
'pylint.extensions.bad_builtin',
'pylint.extensions.broad_try_clause',
'pylint.extensions.check_elif',
'pylint.extensions.code_style',
'pylint.extensions.comparison_placement',
'pylint.extensions.confusing_elif',
'pylint.extensions.consider_refactoring_into_while_condition',
'pylint.extensions.consider_ternary_expression',
'pylint.extensions.dict_init_mutate',
'pylint.extensions.docparams',
'pylint.extensions.docstyle',
'pylint.extensions.dunder',
'pylint.extensions.empty_comment',
'pylint.extensions.eq_without_hash',
'pylint.extensions.for_any_all',
'pylint.extensions.magic_value',
'pylint.extensions.mccabe',
'pylint.extensions.no_self_use',
'pylint.extensions.overlapping_exceptions',
'pylint.extensions.private_import',
'pylint.extensions.redefined_loop_name',
'pylint.extensions.redefined_variable_type',
'pylint.extensions.set_membership',
'pylint.extensions.typing',
'pylint.extensions.while_used',
]

[tool.pylint.messages_control]
disable = [
'abstract-method',
'arguments-differ',
'bad-dunder-name',
'confusing-consecutive-elif',
'consider-using-assignment-expr',
'consider-using-tuple',
'cyclic-import',
'duplicate-code',
'empty-comment',
'fixme',
'import-outside-toplevel',
'invalid-field-call',
'invalid-name',
'invalid-unary-operand-type',
'line-too-long',
'keyword-arg-before-vararg',
'magic-value-comparison',
'missing-docstring',
'no-member',
'no-self-use',
'protected-access',
'redefined-builtin',
'redefined-outer-name',
'redefined-variable-type',
'signature-differs',
'too-complex',
'too-few-public-methods',
'too-many-ancestors',
'too-many-arguments',
'too-many-branches',
'too-many-instance-attributes',
'too-many-locals',
'too-many-return-statements',
'too-many-statements',
'too-many-try-statements',
'unexpected-keyword-arg',
'unused-argument',
'unused-import',
'use-set-for-membership',
'while-used']
enable= [
'useless-suppression',
'use-symbolic-message-instead']
'abstract-method',
'arguments-differ',
'bad-dunder-name',
'confusing-consecutive-elif',
'consider-using-assignment-expr',
'consider-using-tuple',
'cyclic-import',
'duplicate-code',
'empty-comment',
'fixme',
'import-outside-toplevel',
'invalid-field-call',
'invalid-name',
'invalid-unary-operand-type',
'line-too-long',
'keyword-arg-before-vararg',
'magic-value-comparison',
'missing-docstring',
'no-member',
'no-self-use',
'protected-access',
'redefined-builtin',
'redefined-outer-name',
'redefined-variable-type',
'signature-differs',
'too-complex',
'too-few-public-methods',
'too-many-ancestors',
'too-many-arguments',
'too-many-branches',
'too-many-instance-attributes',
'too-many-locals',
'too-many-return-statements',
'too-many-statements',
'too-many-try-statements',
'unexpected-keyword-arg',
'unused-argument',
'unused-import',
'use-set-for-membership',
'while-used',
]
enable = [
'useless-suppression',
'use-symbolic-message-instead',
]

[tool.pylint.reports]
output-format = 'colorized'
Expand All @@ -142,10 +146,10 @@ min-similarity-lines = 10
ignore-imports = 'yes'

[tool.pyright]
include = ["tjax", "tests"]
stubPath = ""
venvPath = "."
venv = ".venv"
include = ['tjax', 'tests']
stubPath = ''
venvPath = '.'
venv = '.venv'
enableTypeIgnoreComments = false
reportImportCycles = true
reportCallInDefaultInitializer = true
Expand Down Expand Up @@ -177,7 +181,7 @@ reportUntypedFunctionDecorator = true
reportUntypedNamedTuple = true

[tool.mypy]
files = ["tjax", "tests"]
files = ['tjax', 'tests']
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
Expand All @@ -200,49 +204,49 @@ module = ['networkx', 'optax']
ignore_missing_imports = true

[tool.ruff]
target-version = "py310"
target-version = 'py310'
line-length = 100

[tool.ruff.lint]
preview = true
select = ["ALL"]
select = ['ALL']
ignore = [
"ANN101", # Missing type annotation for self.
"ANN102", # Missing type annotation for cls.
"ANN401", # Dynamically typed expressions (Any).
"ARG001", # Unused function argument.
"ARG002", # Unused method argument.
"ARG003", # Unused class method argument.
"ARG004", # Unused static method argument.
"B011", # Do not assert false.
"C901", # Complex structure.
"COM812", # Trailing comma missing.
"CPY001", # Missing copyright.
"D100", # Missing docstring in public module.
"D101", # Missing docstring in public class.
"D102", # Missing docstring in public method.
"D103", # Missing docstring in public function.
"D105", # Missing docstring in magic method.
"D107", # Missing docstring in __init__.
"ERA001", # Commented-out code.
"FBT003", # Boolean positional value in function call.
"FIX002", # Line contains TODO, consider resolving the issue.
"G004", # Logging statement uses f-string.
"I001", # Import block is un-sorted or un-formatted.
"PD008", # Use .loc instead of .at. If speed is important, use NumPy.
"PGH003", # Use specific rule codes when ignoring type issues.
"PLR0913", # Too many arguments in function definition.
"PLR6301", # Method doesn't use self.
"PT013", # Found incorrect import of pytest, use simple import pytest instead.
"Q000", # Single quotes found but double quotes preferred.
"RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together...
"S101", # Assert used.
"TCH001", # Move application import into a type-checking block.
"TCH002", # Move third-party import into a type-checking block.
"TCH003", # Move standard library import into a type-checking block.
"TD002", # Missing author in TODO; try: # TODO(<author_name>): ....
"TD003", # Missing issue link on the line following this TODO.
"TID252", # Relative imports from parent modules are banned.
'ANN101', # Missing type annotation for self.
'ANN102', # Missing type annotation for cls.
'ANN401', # Dynamically typed expressions (Any).
'ARG001', # Unused function argument.
'ARG002', # Unused method argument.
'ARG003', # Unused class method argument.
'ARG004', # Unused static method argument.
'B011', # Do not assert false.
'C901', # Complex structure.
'COM812', # Trailing comma missing.
'CPY001', # Missing copyright.
'D100', # Missing docstring in public module.
'D101', # Missing docstring in public class.
'D102', # Missing docstring in public method.
'D103', # Missing docstring in public function.
'D105', # Missing docstring in magic method.
'D107', # Missing docstring in __init__.
'ERA001', # Commented-out code.
'FBT003', # Boolean positional value in function call.
'FIX002', # Line contains TODO, consider resolving the issue.
'G004', # Logging statement uses f-string.
'I001', # Import block is un-sorted or un-formatted.
'PD008', # Use .loc instead of .at. If speed is important, use NumPy.
'PGH003', # Use specific rule codes when ignoring type issues.
'PLR0913', # Too many arguments in function definition.
'PLR6301', # Method doesn't use self.
'PT013', # Found incorrect import of pytest, use simple import pytest instead.
'Q000', # Single quotes found but double quotes preferred.
'RUF021', # Parenthesize `a and b` expressions when chaining `and` and `or` together...
'S101', # Assert used.
'TCH001', # Move application import into a type-checking block.
'TCH002', # Move third-party import into a type-checking block.
'TCH003', # Move standard library import into a type-checking block.
'TD002', # Missing author in TODO; try: # TODO(<author_name>): ....
'TD003', # Missing issue link on the line following this TODO.
'TID252', # Relative imports from parent modules are banned.
]

[tool.ruff.lint.flake8-annotations]
Expand All @@ -255,8 +259,7 @@ max-string-length = 40
combine-as-imports = true

[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
convention = 'google'

[tool.ruff.lint.pylint]
max-args = 8

0 comments on commit e1c592a

Please sign in to comment.