Skip to content

Commit

Permalink
Merge branch 'develop' into style-override-on-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Jan 8, 2022
2 parents 7f11a09 + 34428cb commit 7766a50
Show file tree
Hide file tree
Showing 123 changed files with 3,058 additions and 1,960 deletions.
5 changes: 3 additions & 2 deletions .codeclimate.yml
@@ -1,5 +1,6 @@
version: "2"

# https://codeclimate.com/
# https://docs.codeclimate.com/docs/maintainability#section-checks
# https://docs.codeclimate.com/docs/advanced-configuration#default-checks
checks:
Expand Down Expand Up @@ -31,7 +32,7 @@ plugins:
config:
# https://radon.readthedocs.io/en/latest/commandline.html#the-cc-command
threshold: "C"
shellcheck: #https://docs.codeclimate.com/docs/shellcheck
shellcheck: # https://docs.codeclimate.com/docs/shellcheck
enabled: true
sonar-python: #https://docs.codeclimate.com/docs/sonar-python
sonar-python: # https://docs.codeclimate.com/docs/sonar-python
enabled: true
2 changes: 1 addition & 1 deletion .github/workflows/python.yaml
Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
echo "LINT_DOCS=,lint,docs" >> $GITHUB_ENV
- name: "Run tests on ${{ matrix.os }} with Python ${{ matrix.python-version }}"
- name: "Run tests on ${{ matrix.os }}"
run: |
tox -e clean,$(echo py${{ matrix.python-version }} | tr -d .)${{env.LINT_DOCS}},report
Expand Down
32 changes: 15 additions & 17 deletions .pre-commit-config.yaml
Expand Up @@ -36,9 +36,23 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.30.1
rev: v2.31.0
hooks:
- id: pyupgrade
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
[
--in-place,
--remove-all-unused-imports,
--remove-unused-variables,
--remove-duplicate-keys,
--ignore-init-module-imports,
--exclude,
compat.py,
]
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
Expand Down Expand Up @@ -66,22 +80,6 @@ repos:
hooks:
- id: prettier
stages: [commit]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
name: autoflake
language: python
args:
[
--in-place,
--remove-all-unused-imports,
--remove-unused-variables,
--remove-duplicate-keys,
--ignore-init-module-imports,
--exclude,
compat.py,
]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Expand Up @@ -6,3 +6,6 @@ README.md

# Prettier uses double quotes, ruamel.yaml uses single quotes
tests/test_yaml/*.yaml

# The JSON generated with json.dumps() should not be prettified in tests, otherwise they fail
tests/test_json/*.json
2 changes: 1 addition & 1 deletion .pylintrc
Expand Up @@ -38,7 +38,7 @@ disable=bad-continuation,bad-whitespace,
bad-functions=map,filter

# Good variable names which should always be accepted, separated by a comma
good-names = i,j,k,e,ex,Run,_,id,rv
good-names = i,j,k,e,ex,Run,_,id,rv,c

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|([a-z_][a-z0-9_]*)|(__.*__)|register|urlpatterns)$
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Expand Up @@ -4,7 +4,7 @@ sphinx:
configuration: docs/conf.py
formats: all
python:
version: 3.8
version: "3.8"
install:
- method: pip
path: .
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.rst
@@ -1,3 +1,5 @@
.. include:: targets.rst

============
Contributing
============
Expand All @@ -11,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 there <https://github.com/andreoliwa/nitpick/issues/new/choose>`_.
* 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
10 changes: 8 additions & 2 deletions Makefile
Expand Up @@ -22,11 +22,17 @@ help:
build: .cache/make/pytest .cache/make/pre-commit # Quick build for local development
.PHONY: build

.cache/make/pytest: $(SRC) $(TESTS)
.delete-cache:
# Force a cache update before running "nitpick fix" in pre-commit
# TODO: the cache doesn't detect changes in TOML style files
rm -rf .cache/nitpick
.PHONY: .delete-cache

.cache/make/pytest: .delete-cache $(SRC) $(TESTS)
invoke test
touch .cache/make/pytest

.cache/make/pre-commit: $(ANY)
.cache/make/pre-commit: .delete-cache $(ANY)
pre-commit run -a
touch .cache/make/pre-commit

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -109,7 +109,7 @@ Implemented
* - `Any TOML file <https://nitpick.rtfd.io/en/latest/plugins.html#toml-files>`_
- ✅
- ✅
* - `Any YAML file (except .pre-commit-config.yaml) <https://nitpick.rtfd.io/en/latest/plugins.html#yaml-files>`_
* - `Any YAML file <https://nitpick.rtfd.io/en/latest/plugins.html#yaml-files>`_
- ✅
- ✅
* - `.editorconfig <https://nitpick.rtfd.io/en/latest/examples.html#example-editorconfig>`_
Expand All @@ -120,7 +120,7 @@ Implemented
- ✅
* - `.pre-commit-config.yaml <https://nitpick.rtfd.io/en/latest/plugins.html#pre-commit-config-yaml>`_
- ✅
- `#282 <https://github.com/andreoliwa/nitpick/issues/282>`_ 🚧
-
* - `.pylintrc <https://nitpick.rtfd.io/en/latest/plugins.html#ini-files>`_
- ✅
- ✅
Expand Down

0 comments on commit 7766a50

Please sign in to comment.