Skip to content

Commit

Permalink
style: remove python prefix from TOML files under python dir
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Jan 8, 2022
1 parent 352b53d commit d2705d4
Show file tree
Hide file tree
Showing 16 changed files with 109 additions and 110 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Expand Up @@ -13,7 +13,7 @@ Bug reports or feature requests
===============================

* First, search the `GitHub issue tracker <https://github.com/andreoliwa/nitpick/issues>`_ to see if your bug/feature is already there.
* If nothing is found, just `add a new issue and follow the instructions <new issue>`_.
* If nothing is found, just `add a new issue and follow the instructions <https://github.com/andreoliwa/nitpick/issues/new/choose>`_.

Documentation improvements
==========================
Expand Down
150 changes: 75 additions & 75 deletions docs/examples.rst
Expand Up @@ -201,6 +201,66 @@ Contents of `resources/javascript/package-json.toml <https://github.com/andreoli
["package.json"]
contains_keys = ["name", "version", "repository.type", "repository.url", "release.plugins"]
.. _example-python-3-10:

Python 3.10
-----------

Contents of `resources/python/310.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/310.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.10"
.. _example-python-3-6:

Python 3.6
----------

Contents of `resources/python/36.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/36.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.6.1"
.. _example-python-3-7:

Python 3.7
----------

Contents of `resources/python/37.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/37.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.7"
.. _example-python-3-8:

Python 3.8
----------

Contents of `resources/python/38.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/38.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.8"
.. _example-python-3-9:

Python 3.9
----------

Contents of `resources/python/39.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/39.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.9"
.. _example-absent-files:

Absent files
Expand Down Expand Up @@ -558,81 +618,6 @@ Contents of `resources/python/pylint.toml <https://github.com/andreoliwa/nitpick
[".codeclimate.yml".plugins.pylint] # https://docs.codeclimate.com/docs/pylint Already checked by pre-commit
enabled = false
.. _example-python-stable-version:

Python (stable version)
-----------------------

Contents of `resources/python/python-stable.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python-stable.toml>`_:

.. code-block:: toml
[".readthedocs.yml".python]
# ReadTheDocs still didn't upgrade to Python 3.9:
# Problem in your project's configuration. Invalid "python.version":
# expected one of (2, 2.7, 3, 3.5, 3.6, 3.7, 3.8, pypy3.5), got 3.9
version = "3.8"
.. _example-python-3-10:

Python 3.10
-----------

Contents of `resources/python/python310.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python310.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.10"
.. _example-python-3-6:

Python 3.6
----------

Contents of `resources/python/python36.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python36.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.6.1"
.. _example-python-3-7:

Python 3.7
----------

Contents of `resources/python/python37.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python37.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.7"
.. _example-python-3-8:

Python 3.8
----------

Contents of `resources/python/python38.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python38.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.8"
.. _example-python-3-9:

Python 3.9
----------

Contents of `resources/python/python39.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/python39.toml>`_:

.. code-block:: toml
["pyproject.toml".tool.poetry.dependencies]
python = "^3.9"
.. _example-radon:

radon_
Expand Down Expand Up @@ -683,6 +668,21 @@ Contents of `resources/python/sonar-python.toml <https://github.com/andreoliwa/n
# https://github.com/SonarSource/sonar-python
enabled = true
.. _example-python-stable-version:

Python (stable version)
-----------------------

Contents of `resources/python/stable.toml <https://github.com/andreoliwa/nitpick/blob/v0.29.0/resources/python/stable.toml>`_:

.. code-block:: toml
[".readthedocs.yml".python]
# ReadTheDocs still didn't upgrade to Python 3.9:
# Problem in your project's configuration. Invalid "python.version":
# expected one of (2, 2.7, 3, 3.5, 3.6, 3.7, 3.8, pypy3.5), got 3.9
version = "3.8"
.. _example-tox:

tox_
Expand Down
12 changes: 6 additions & 6 deletions docs/generate_rst.py
Expand Up @@ -62,13 +62,13 @@
"any/commitlint.toml": "commitlint_",
"python/hooks.toml": "pre-commit_ hooks for Python",
"python/pylint.toml": "Pylint_",
"python/python36.toml": "Python 3.6",
"python/python37.toml": "Python 3.7",
"python/python38.toml": "Python 3.8",
"python/python39.toml": "Python 3.9",
"python/python310.toml": "Python 3.10",
"python/36.toml": "Python 3.6",
"python/37.toml": "Python 3.7",
"python/38.toml": "Python 3.8",
"python/39.toml": "Python 3.9",
"python/310.toml": "Python 3.10",
"python/tox.toml": "tox_",
"python/python-stable.toml": "Python (stable version)",
"python/stable.toml": "Python (stable version)",
"python/readthedocs.toml": "ReadTheDocs_",
"any/git-legal.toml": "git-legal_",
"any/hooks.toml": "pre-commit_ hooks for any language",
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins.rst
Expand Up @@ -85,7 +85,7 @@ Enforce configurations and autofix YAML files.
The plugin tries to preserve comments in the YAML file by using the ``ruamel.yaml`` package.
It works for most cases.
If your comment was removed, place them in a different place of the fil and try again.
If it still doesn't work, please `report a bug <new issue>`_.
If it still doesn't work, please `report a bug <https://github.com/andreoliwa/nitpick/issues/new/choose>`_.

Known issue: lists like ``args`` and ``additional_dependencies`` might be joined in a single line,
and comments between items will be removed.
Expand Down
1 change: 0 additions & 1 deletion docs/targets.rst
Expand Up @@ -31,7 +31,6 @@
.. _isort: https://github.com/PyCQA/isort
.. _markdownlint: https://github.com/markdownlint/markdownlint
.. _mypy: https://github.com/python/mypy
.. _new issue: https://github.com/andreoliwa/nitpick/issues/new/choose
.. _package.json: https://docs.npmjs.com/files/package.json
.. _pipx: https://github.com/pipxproject/pipx
.. _pre-commit: https://github.com/pre-commit/pre-commit
Expand Down
2 changes: 1 addition & 1 deletion nitpick-style.toml
Expand Up @@ -7,7 +7,7 @@ minimum_version = "0.10.0"
[nitpick.styles]
include = [
# Suggest the current stable Python version for projects
"py://nitpick/resources/python/python39",
"py://nitpick/resources/python/39",

"py://nitpick/resources/python/absent",
"py://nitpick/resources/python/bandit",
Expand Down
42 changes: 21 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -2,8 +2,8 @@
# Use the default style and override some things (like the Python version)
style = [
"nitpick-style",
"py://nitpick/resources/python/python36.toml",
"py://nitpick/resources/python/python-stable.toml"
"py://nitpick/resources/python/36.toml",
"py://nitpick/resources/python/stable.toml"
]

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion src/nitpick/plugins/yaml.py
Expand Up @@ -80,7 +80,7 @@ class YamlPlugin(NitpickPlugin):
The plugin tries to preserve comments in the YAML file by using the ``ruamel.yaml`` package.
It works for most cases.
If your comment was removed, place them in a different place of the fil and try again.
If it still doesn't work, please `report a bug <new issue>`_.
If it still doesn't work, please `report a bug <https://github.com/andreoliwa/nitpick/issues/new/choose>`_.
Known issue: lists like ``args`` and ``additional_dependencies`` might be joined in a single line,
and comments between items will be removed.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_yaml/real.toml
Expand Up @@ -7,7 +7,7 @@ minimum_version = "0.10.0"
[nitpick.styles]
include = [
# Suggest the current stable Python version for projects
"py://nitpick/resources/python/python39",
"py://nitpick/resources/python/39",

"py://nitpick/resources/python/absent",
"py://nitpick/resources/python/bandit",
Expand Down

0 comments on commit d2705d4

Please sign in to comment.