diff --git a/.devcontainer.json b/.devcontainer.json index 8091b2a..8723323 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -19,7 +19,7 @@ } }, "postCreateCommand": { - "pre-commit": "pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push", + "pre-commit": "pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push", "dev-requirements": "python2 -m pip install --requirement requirements.txt" } -} +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 4d346b8..c7b7d52 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,19 +6,17 @@ root = true [*] charset = utf-8 end_of_line = lf +indent_style = space trim_trailing_whitespace = true [*.{json}] indent_size = 2 -indent_style = space insert_final_newline = false [*.{md,toml,yaml,yml}] indent_size = 2 -indent_style = space insert_final_newline = true -[*.{py,pyi}] +[*.{ini,py,pyi}] indent_size = 4 -indent_style = space -insert_final_newline = true \ No newline at end of file +insert_final_newline = true diff --git a/LICENSE b/LICENSE index 7191dd4..3f61671 100644 --- a/LICENSE +++ b/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ae18300..1daccd1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] name = java_api version = 17.26.0 -description = Java API Specification for ignition-api +description = Java API Specification long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/ignition-devs/java-api diff --git a/setup.py b/setup.py index d9cbc9b..f4cb572 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ # pylint: skip-file -"""Java API Specification.""" +"""Java API Specification""" from setuptools import setup diff --git a/stubs/pyproject.toml b/stubs/pyproject.toml index 9810e8f..9c799b6 100644 --- a/stubs/pyproject.toml +++ b/stubs/pyproject.toml @@ -1,7 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools", + "setuptools>=61.2", ] [project] @@ -35,15 +35,13 @@ classifiers = [ "Typing :: Stubs Only", "Typing :: Typed", ] -urls.Homepage = "https://github.com/ignition-devs/java-api" urls.Documentation = "https://docs.oracle.com/en/java/javase/17/docs/api/index.html" urls.Funding = "https://github.com/sponsors/cesarcoatl" +urls.Homepage = "https://github.com/ignition-devs/java-api" urls.Source = "https://github.com/ignition-devs/java-api/tree/main" urls.Tracker = "https://github.com/ignition-devs/java-api/issues" [tool.setuptools] include-package-data = true package-dir = { "" = "stubs" } - -[tool.setuptools.package-data] -"*" = [ "*.pyi", "py.typed" ] +package-data."*" = [ "*.pyi", "py.typed" ] diff --git a/stubs/tox.ini b/stubs/tox.ini index 13eb072..80d9fb0 100644 --- a/stubs/tox.ini +++ b/stubs/tox.ini @@ -11,7 +11,7 @@ description = run type check on code base base_python = python3.12 skip_install = true deps = - mypy[python2]@ git+https://github.com/coatl-dev/mypy.git@v0.971 + mypy[python2] @ git+https://github.com/coatl-dev/mypy.git@v0.971 commands = mypy stubs diff --git a/tox.ini b/tox.ini index 423ac20..ab1923a 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ description = run type check on code base base_python = python3.12 skip_install = true deps = - mypy[python2]@ git+https://github.com/coatl-dev/mypy.git@v0.971 + mypy[python2] @ git+https://github.com/coatl-dev/mypy.git@v0.971 commands = mypy --install-types --non-interactive src @@ -26,54 +26,24 @@ description = generate stubs base_python = python3.12 skip_install = true deps = - mypy[python2]@ git+https://github.com/coatl-dev/mypy.git@v0.971 + mypy[python2] @ git+https://github.com/coatl-dev/mypy.git@v0.971 commands = stubgen --export-less --output=stubs{/}stubs src -[testenv:style] -description = apply style -base_python = python3.12 -skip_install = true -deps = - black - docformatter - flake8@ git+https://github.com/coatl-dev/flake8.git@5.0.4 - isort - pydoclint - pydocstyle - sort-all - unimport -commands = - python -c \ - "import pathlib, subprocess; \ - files = [str(p) for p in pathlib.Path('src').rglob('*.py')]; \ - subprocess.run(['sort-all'] + files, check=True)" - black --quiet src - unimport src - isort --settings-file=tox.ini src - docformatter \ - --in-place \ - --wrap-summaries 72 \ - --close-quotes-on-newline \ - --recursive \ - src - flake8 --select=DOC --config=tox.ini src - pydocstyle --config=tox.ini src{/}system - [docformatter] +close-quotes-on-newline = true in-place = true wrap-summaries = 72 -close-quotes-on-newline = true [flake8] +arg-type-hints-in-docstring = False +arg-type-hints-in-signature = False +check-return-types = False ignore = DOC202, E741, F821 max-complexity = 10 max-doc-length = 72 max-line-length = 120 style = google -arg-type-hints-in-docstring = False -arg-type-hints-in-signature = False -check-return-types = False [isort] extra_standard_library = typing @@ -81,5 +51,5 @@ profile = black py_version = 27 [pydocstyle] -convention = google add_ignore = D101, D102, D104, D105, D106, D107, D205, D415 +convention = google