@@ -19,29 +19,13 @@ license = { text = "Apache Software License" }
1919name = " apify_shared"
2020readme = " README.md"
2121requires-python = " >=3.8"
22- version = " 1.0.5 "
22+ version = " 1.1.0 "
2323
2424[project .optional-dependencies ]
2525dev = [
26- " autopep8 ~= 2.0.4" ,
2726 " build ~= 1.0.3" ,
2827 " filelock ~= 3.12.4" ,
29- " flake8 ~= 6.1.0" ,
30- " flake8-bugbear ~= 23.9.16" ,
31- " flake8-commas ~= 2.1.0; python_version < '3.12'" ,
32- " flake8-comprehensions ~= 3.14.0" ,
33- " flake8-datetimez ~= 20.10.0" ,
34- " flake8-docstrings ~= 1.7.0" ,
35- " flake8-encodings ~= 0.5.0" ,
36- " flake8-isort ~= 6.1.0" ,
37- " flake8-noqa ~= 1.3.1; python_version < '3.12'" ,
38- " flake8-pytest-style ~= 1.7.2" ,
39- " flake8-quotes ~= 3.3.2; python_version < '3.12'" ,
40- " flake8-simplify ~= 0.21.0" ,
41- " flake8-unused-arguments ~= 0.0.13" ,
42- " isort ~= 5.12.0" ,
4328 " mypy ~= 1.5.1" ,
44- " pep8-naming ~= 0.13.3" ,
4529 " pre-commit ~= 3.4.0" ,
4630 " pydoc-markdown ~= 4.8.2" ,
4731 " pytest ~= 7.4.2" ,
@@ -50,6 +34,7 @@ dev = [
5034 " pytest-timeout ~= 2.2.0" ,
5135 " pytest-xdist ~= 3.3.1" ,
5236 " respx ~= 0.20.1" ,
37+ " ruff ~= 0.1.5" ,
5338 " twine ~= 4.0.2" ,
5439]
5540
@@ -69,3 +54,57 @@ where = ["src"]
6954
7055[tool .setuptools .package-data ]
7156apify_shared = [" py.typed" ]
57+
58+ [tool .ruff ]
59+ line-length = 120
60+ select = [" ALL" ]
61+ ignore = [
62+ " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed in {filename}
63+ " BLE001" , # Do not catch blind exception
64+ " COM812" , # This rule may cause conflicts when used with the formatter
65+ " D100" , # Missing docstring in public module
66+ " D104" , # Missing docstring in public package
67+ " EM" , # flake8-errmsg
68+ " ISC001" , # This rule may cause conflicts when used with the formatter
69+ " FIX" , # flake8-fixme
70+ " PGH003" , # Use specific rule codes when ignoring type issues
71+ " PLR0913" , # Too many arguments in function definition
72+ " PTH" , # flake8-use-pathlib
73+ " S102" , # Use of `exec` detected
74+ " S105" , # Possible hardcoded password assigned to
75+ " TD002" , # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO @<author_name>: ...
76+ " TID252" , # Relative imports from parent modules are bannedRuff
77+ " TRY003" , # Avoid specifying long messages outside the exception class
78+ ]
79+
80+ [tool .ruff .format ]
81+ quote-style = " single"
82+ indent-style = " space"
83+
84+ [tool .ruff .lint .per-file-ignores ]
85+ "**/__init__.py" = [
86+ " F401" , # Unused imports
87+ ]
88+ "**/{scripts}/*" = [
89+ " D" , # Everything from the pydocstyle
90+ " INP001" , # File {filename} is part of an implicit namespace package, add an __init__.py
91+ " PLR2004" , # Magic value used in comparison, consider replacing {value} with a constant variable
92+ " T20" , # flake8-print
93+ ]
94+ "**/{tests}/*" = [
95+ " D" , # Everything from the pydocstyle
96+ " INP001" , # File {filename} is part of an implicit namespace package, add an __init__.py
97+ " PLR2004" , # Magic value used in comparison, consider replacing {value} with a constant variable
98+ " T20" , # flake8-print
99+ " S101" , # Use of assert detected
100+ ]
101+
102+ [tool .ruff .lint .flake8-quotes ]
103+ docstring-quotes = " double"
104+ inline-quotes = " single"
105+
106+ [tool .ruff .lint .isort ]
107+ known-first-party = [" apify" , " apify_client" , " apify_shared" ]
108+
109+ [tool .ruff .lint .pydocstyle ]
110+ convention = " google"
0 commit comments