diff --git a/CHANGELOG.md b/CHANGELOG.rst similarity index 92% rename from CHANGELOG.md rename to CHANGELOG.rst index 81110ac1..b7956127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.rst @@ -1,7 +1,8 @@ -Prospector Changelog -======= +Changelog +========= -## Version 1.3.0 +Version 1.3.0 +------------- - Update pylint support to 2.5.2 - Update pylint-django to 2.0.15 - Update pyflakes support to 2.2.0 @@ -18,7 +19,8 @@ Prospector Changelog - Add new pylint option: `use_pylint_default_path_finder` to make sure there's an option to preserve pylint default behavior. - Update pyflakes error code list to the recent version -## Version 1.2.0 +Version 1.2.0 +------------- - Drop Python 3.4 support - [#308](https://github.com/PyCQA/prospector/pull/308) Update pyflakes support to < 2.1.0 - [#324](https://github.com/PyCQA/prospector/pull/324) Add bandit support @@ -26,7 +28,8 @@ Prospector Changelog - [#349](https://github.com/PyCQA/prospector/pull/349) and [#355](https://github.com/PyCQA/prospector/pull/355) Fix compatibility issues with mypy >= 0.730 - [#356](https://github.com/PyCQA/prospector/pull/356) Add support for Python 3.8 -## Version 1.1.7 +Version 1.1.7 +------------- - [#299](https://github.com/PyCQA/prospector/pull/299) Output path tests and abspaths for windows - [#300](https://github.com/PyCQA/prospector/pull/300) Fix `check_paths` definition for pep8tool @@ -36,77 +39,93 @@ Prospector Changelog - [#343](https://github.com/PyCQA/prospector/pull/343) Support more kinds of mypy messages - [@5ea0e95](https://github.com/PyCQA/prospector/pull/342/commits/5ea0e95ac28db0911e37bc07be036c27078591b4) Pin astroid to 2.2.5 -## Version 1.1.6.4 +Version 1.1.6.4 +--------------- - [#333](https://github.com/PyCQA/prospector/pull/333) Hotfix for pylint module run - [#309](https://github.com/PyCQA/prospector/pull/309) Remove the pylint locally-enabled message suppression -## Version 1.1.6.2 +Version 1.1.6.2 +--------------- - [#304](https://github.com/PyCQA/prospector/pull/304) Pin pylint to 2.1.1 for now as prospector is not compatible with 2.2.0 - [#302](https://github.com/PyCQA/prospector/issues/302) Pin astroid to 2.0.4 as pylint-django and pylint-flask need fixes to be compatible with newer versions -## Version 1.1.6.1 +Version 1.1.6.1 +--------------- - [#292](https://github.com/PyCQA/prospector/issues/292) Adding pylint plugin dependencies back and fixing autodetect behaviour. - (note: .1 added as 1.1.6 upload to PyPI was broken) -# Version 1.1.5 -- [#283](https://github.com/PyCQA/prospector/pull/283) Remove unexpected argument from read_config_file - Remove quiet -argument +Version 1.1.5 +------------- +- [#283](https://github.com/PyCQA/prospector/pull/283) Remove unexpected argument from read_config_file - Remove quiet argument - [#291](https://github.com/PyCQA/prospector/pull/291) Update pycodestyle support until 2.4.0 - [#280](https://github.com/PyCQA/prospector/pull/280) Add strict option and fixed emacs output format for mypy tool - [#282](https://github.com/PyCQA/prospector/pull/282) Fix working dir detection -## Version 1.1.4 +Version 1.1.4 +--------------- - [#285](https://github.com/PyCQA/prospector/issues/285) Fix dependency tree resolution - now insists on `pep8-naming<=0.4.1` as later versions cause conflicting versions of flake8 to be installed. -## Version 1.1.3 +Version 1.1.3 +--------------- - [#279](https://github.com/PyCQA/prospector/issues/279) Fix --show-profile crash -## Version 1.1.2 +Version 1.1.2 +--------------- - [#276](https://github.com/PyCQA/prospector/issues/276) Updating required Pyroma version and removing some warnings which were removed from Pyroma - thanks [@volans-](https://github.com/volans-) for PR [#277](https://github.com/PyCQA/prospector/pull/277) -## Version 1.1.1 +Version 1.1.1 +--------------- - Removing [pylint-common](https://github.com/landscapeio/pylint-common) as a direct dependency as it does not add a lot of utility and is not kept up to date as much as other plugins -## Version 1.1 +Version 1.1 +--------------- - [#267](https://github.com/PyCQA/prospector/pull/267) Fix read_config_file using quiet keyword with older pylint versions - [#262](https://github.com/PyCQA/prospector/pull/262) Bugfix report different behavior based on path(includes KeyError on FORMATTERS fix) -## Version 1.0 +Version 1.0 +--------------- - [#228](https://github.com/PyCQA/prospector/pull/228) Add mypy support - [#249](https://github.com/PyCQA/prospector/pull/249) Add option to point to pylintrc inside prospector configuration file - [#250](https://github.com/PyCQA/prospector/pull/250) Add option to redirect prospector output to files - [#261](https://github.com/PyCQA/prospector/pull/261) Drop Python 3.3 support - [#261](https://github.com/PyCQA/prospector/pull/261) Use Pylint >= 2 for Python 3 -## Version 0.12.11 +Version 0.12.11 +--------------- - [#256](https://github.com/PyCQA/prospector/pull/256) Match relative paths that giving different results when using `--absolute-paths` flag - Pin vulture version < 0.25 -## Version 0.12.10 +Version 0.12.10 +--------------- - Force pyroma >= 2.3 - [#236](https://github.com/PyCQA/prospector/pull/236) Fix typo and update URLs in docs -## Version 0.12.9 +Version 0.12.9 +--------------- - [#237](https://github.com/PyCQA/prospector/pull/237) Load pylint plugins before pylint config - [#253](https://github.com/PyCQA/prospector/issues/253) Relaxing pyroma constraint - [#229](https://github.com/PyCQA/prospector/issues/229) prospector crashes on startup if a recent pyroma is installed -## Version 0.12.8 +Version 0.12.8 +--------------- * Enforece pylint, pyflakes and pycodestyle versions to avoid breaking other dependent tools * [#242](https://github.com/PyCQA/prospector/pull/248) Fix absolute path issue with pylint * [#234](https://github.com/PyCQA/prospector/pull/234) Added Python 3.5/3.6 support on build -## Version 0.12.7 +Version 0.12.7 +--------------- * Enforcing pydocstyle >= 2.0.0 for API compatability reliability -## Version 0.12.6 +Version 0.12.6 +--------------- * [#210](https://github.com/landscapeio/prospector/issues/210) [#212](https://github.com/landscapeio/prospector/issues/212) Removing debug output accidentally left in (@souliane) * [#211](https://github.com/landscapeio/prospector/issues/211) Added VSCode extension to docs (@DonJayamanne) * [#215](https://github.com/landscapeio/prospector/pull/215) Support `pydocstyle>=2.0` (@samspillaz) * [#217](https://github.com/landscapeio/prospector/issues/217) Updating links to supported tools in docs (@mbeacom) * [#219](https://github.com/landscapeio/prospector/pull/219) Added a `__main__.py` to allow calling `python -m prospector` (@cprogrammer1994) -## Version 0.12.5 +Version 0.12.5 +--------------- * [#207](https://github.com/landscapeio/prospector/pull/207) Fixed missing 'UnknownMessage' exception caused by recent pylint submodule changes * Minor documentation formatting updates * [#202](https://github.com/landscapeio/prospector/issues/202) Ignoring .tox directories to avoid accidentally checking the code in there @@ -115,21 +134,25 @@ argument * [#194](https://github.com/landscapeio/prospector/pull/194) Fixes for compatability with vulture 0.9+ * [#191](https://github.com/landscapeio/prospector/pull/191) Fixes for compatability with pydocstyle 1.1+ -## Version 0.12.4 +Version 0.12.4 +--------------- * Panicky stapling of pyroma dependency until prospector is fied to not break with the new pyroma release -## Version 0.12.3 +Version 0.12.3 +--------------- * [#190](https://github.com/landscapeio/prospector/pull/190) Pinning pydocstyle version for now until API compatability with newer versions can be written * [#184](https://github.com/landscapeio/prospector/pull/184) Including the LICENCE file when building dists * Fixed a crash in the profile_validator tool if an empty profile was found * (Version 0.12.2 does not exist due to a counting error...) -## Version 0.12.1 +Version 0.12.1 +--------------- * [#178](https://github.com/landscapeio/prospector/pull/178) Long paths no longer cause crash in Windows. * [#173](https://github.com/landscapeio/prospector/issues/154) Changed from using pep8 to pycodestyle (which is what pep8 was renamed to) * [#172](https://github.com/landscapeio/prospector/issues/172) Fixed non-ascii file handling for mccabe tool and simplified all python source file reading -## Version 0.12 +Version 0.12 +--------------- * [#170](https://github.com/landscapeio/prospector/issues/170) Changed from using pep257 to pydocstyle (which is what pep257 is now called) * [#162](https://github.com/landscapeio/prospector/issues/162) Properly warning about optional tools which are not installed * [#166](https://github.com/landscapeio/prospector/pulls/166) Added vscode formater @@ -137,29 +160,37 @@ argument * [#156](https://github.com/landscapeio/prospector/pulls/156) Better pyroma logging hack for when pyroma is not installed * [#158](https://github.com/landscapeio/prospector/pulls/158) Fixed max-line-length command line option -## Version 0.11.7 +Version 0.11.7 +--------------- * Wrapping all tools so that none can directly write to stdout/stderr, as this breaks the output format for things like json. Instead, it is captured and optionally included as a regular message. -## Version 0.11.6 +Version 0.11.6 +--------------- * Yet more 'dodgy' encoding problem avoidance -## Version 0.11.5 +Version 0.11.5 +--------------- * Including forgotten 'python-targets' value in profile serialization -## Version 0.11.4 +Version 0.11.4 +--------------- * Prevented 'dodgy' tool from trying to analyse compressed text data -## Version 0.11.3 +Version 0.11.3 +--------------- * Fixed encoding of file contents handling by tool "dodgy" under Python3 -## Version 0.11.2 +Version 0.11.2 +--------------- * Fixed a file encoding detection issue when running under Python3 * If a pylint plugin is specified in a .pylintrc file which cannot be loaded, prospector will now carry on with a warning rather than simply crash -## Version 0.11.1 +Version 0.11.1 +--------------- * [#147](https://github.com/landscapeio/prospector/issues/147) Fixed crash when trying to load pylint configuration files in pylint 1.5 -## Version 0.11 +Version 0.11 +--------------- * Compatability fixes to work with pylint>=1.5 * McCabe tool now reports correct line and character number for syntax errors (and therefore gets blended if pylint etc detects such an error) * Autodetect of libraries will now not search inside virtualenvironments @@ -171,57 +202,71 @@ argument * [#132](https://github.com/landscapeio/prospector/issues/132) Added support for custom flask linting thanks to the awesome [pylint-flask](https://github.com/jschaf/pylint-flask) plugin by [jschaf](https://github.com/jschaf) * [#131](https://github.com/landscapeio/prospector/pull/131), [#134](https://github.com/landscapeio/prospector/pull/134) Custom pylint plugins are now loaded from existing .pylintrc files if present (thanks [@kaidokert](https://github.com/kaidokert) and [@antoviaque](https://github.com/antoviaque)) -## Version 0.10.2 +Version 0.10.2 +--------------- * Added information to summary to explain what external configuration was used (if any) to configure the underlying tools * Fixed supression-token search to use (or at least guess) correct file encoding -## Version 0.10.1 +Version 0.10.1 +--------------- * [#116](https://github.com/landscapeio/prospector/issues/116) Comparison failed between messages with numeric values for character and those with a `None` value (thanks @smspillaz) * [#118](https://github.com/landscapeio/prospector/issues/118) Unified output of formatters to have correct output of str rather than bytes (thanks @prophile) * [#115](https://github.com/landscapeio/prospector/issues/115) Removed argparse as an explicit dependency as only Python 2.7+ is supported now -## Version 0.10 +Version 0.10 +--------------- * [#112](https://github.com/landscapeio/prospector/issues/112) Profiles will now also be autoloaded from directories named `.prospector`. * [#32](https://github.com/landscapeio/prospector/issues/32) and [#108](https://github.com/landscapeio/prospector/pull/108) Added a new 'xunit' output formatter for tools and services which integrate with this format (thanks to [lfrodrigues](https://github.com/lfrodrigues)) * Added a new built-in profile called 'flake8' for people who want to mimic the behaviour of 'flake8' using prospector. -## Version 0.9.10 +Version 0.9.10 +--------------- * The profile validator would load any file whose name was a subset of '.prospector.yaml' due to using the incorrect comparison operator. * Fixing a crash when using an empty `ignore-patterns` list in a profile. * Fixing a crash when a profile is not valid YAML at all. * [#105](https://github.com/landscapeio/prospector/pull/105) pyflakes was not correctly ignoring errors. -## Version 0.9.9 +Version 0.9.9 +--------------- * pep8.py 1.6.0 added new messages, which are now in prospector's built-in profiles -## Version 0.9.8 +Version 0.9.8 +--------------- * Fixing a crash when using pep8 1.6.0 due to the pep8 tool renaming something that Prospector uses -## Version 0.9.7 +Version 0.9.7 +--------------- * [#104](https://github.com/landscapeio/prospector/issues/104) The previous attempt at normalising bytestrings and unicode in Python 2 was clumsily done and a bit broken. It is hopefully now using the correct voodoo incantations to get characters from one place to another. * The blender combinations were not updated to use the new PyFlakes error codes; this is now fixed. -## Version 0.9.6 +Version 0.9.6 +--------------- * The profile validator tool was always outputting absolute paths in messages. This is now fixed. * The "# NOQA" checking was using absolute paths incorrectly, which meant the message locations (with relative paths) did not match up and no messages were suppressed. -## Version 0.9.5 +Version 0.9.5 +--------------- * Fixed a problem with profile serialising where it was using the incorrect dict value for strictness -## Version 0.9.4 +Version 0.9.4 +--------------- * The previous PEP257 hack was not compatible with older versions of pep257. -## Version 0.9.3 +Version 0.9.3 +--------------- * The PEP257 tool sets a logging level of DEBUG globally when imported as of version 0.4.1, and this causes huge amounts of tokenzing debug to be output. Prospector now has a hacky workaround until that is fixed. * Extra profile information (mainly the shorthand information) is kept when parsing and serializing profiles. -## Version 0.9.2 +Version 0.9.2 +--------------- * There were some problems related to absolute paths when loading profiles that were not in the current working directory. -## Version 0.9.1 +Version 0.9.1 +--------------- * Mandating version 0.2.3 of pylint-plugin-utils, as the earlier ones don't work with the add_message API changes made in pylint 1.4+ -## Version 0.9 +Version 0.9 +--------------- * [#102](https://github.com/landscapeio/prospector/pull/102) By default, prospector will hide pylint's "no-member" warnings, because more often than not they are simply incorrect. They can be re-enabled with the '--member-warnings' command line flag or the 'member-warnings: true' profile option. * [#101](https://github.com/landscapeio/prospector/pull/101) Code annotated with pep8/flake8 style "# noqa" comments is now understood by prospector and will lead to messages from other tools being suppressed too. * [#100](https://github.com/landscapeio/prospector/pull/100) Pyflakes error codes have been replaced with the same as those used in flake8, for consistency. Profiles with the old values will still work, and the profile-validator will warn you to upgrade. @@ -235,20 +280,24 @@ argument * pep257 messages are now properly blended with other tools' documentation warnings * Path and output character encoding is now handled much better (which is to say, it is handled; previously it wasn't at all). -## Version 0.8.3 +Version 0.8.3 +--------------- * [#96](https://github.com/landscapeio/prospector/issues/96) and [#97](https://github.com/landscapeio/prospector/issues/97) - disabling messages in profiles now works for pep8 -## Version 0.8.2 +Version 0.8.2 +--------------- * Version loading in setup.py no longer imports the prospector module (which could lead to various weirdnesses when installing on different platforms) * [#82](https://github.com/landscapeio/prospector/issues/82) resolves regression in adapter library detection raising, ``ValueError: too many values to unpack``. provided by [@jquast](https://github.com/jquast) * [#83](https://github.com/landscapeio/prospector/issues/83) resolves regression when adapter library detects django, ``TypeError: '_sre.SRE_Pattern' object is not iterable``. provided by [@jquast](https://github.com/jquast) -## Version 0.8.1 +Version 0.8.1 +--------------- * Strictness now also changes which pep257 messages are output * pep257 and vulture messages are now combined and 'blended' with other tools * [#80](https://github.com/landscapeio/prospector/issues/80) Fix for Python3 issue when detecting libraries, provided by [@smspillaz](https://github.com/smspillaz) -## Version 0.8 +Version 0.8 +--------------- * Demoted frosted to be an optional tool - this is because development seems to have slowed and pyflakes has picked up again, and frosted how has several issues which are solved by pyflakes and is no longer a useful addition. * [#78](https://github.com/landscapeio/prospector/issues/78) Prospector can now take multiple files as a path argument, thus providing errors for several files at a time. This helps when integrating with IDEs, for example. * Upgrading to newer versions of Pylint and related dependencies resolves [#73](https://github.com/landscapeio/prospector/issues/73), [#75](https://github.com/landscapeio/prospector/issues/75), [#76](https://github.com/landscapeio/prospector/issues/76) and [#79](https://github.com/landscapeio/prospector/issues/79) @@ -260,24 +309,24 @@ argument * Using pylint 1.4's 'unsafe' mode, which allows it to load any C extensions (this was the behaviour for 1.3 and below). Not loading them causes many many inference errors. * [#65](https://github.com/landscapeio/prospector/issues/65) Resolve UnicodeDecodeErrors thrown while attempting to auto-discover modules of interest by discovering target python source file encoding (PEP263), and issuing only a warning if it fails (thanks to [Jeff Quast](https://github.com/jquast)). -## Version 0.7.3 - +Version 0.7.3 +--------------- * Pylint dependency version restricted to 1.3, as 1.4 drops support for Python 2.6. Prospector will drop support for Python 2.6 in a 0.8 release. * File names ending in 'tests.py' will now be ignored if prospector is set to ignore tests (previously, the regular expression only ignored files ending in 'test.py') * [#70](https://github.com/landscapeio/prospector/issues/70) Profiles starting with a `.yml` extension can now be autoloaded * [#62](https://github.com/landscapeio/prospector/issues/62) For human readable output, the summary of messages will now be printed at the end rather than at the start, so the summary will be what users see when running prospector (without piping into `less` etc) -## Version 0.7.2 - +Version 0.7.2 +--------------- * The E265 error from PEP8 - "Block comment should start with '# '" - has been disabled for anything except veryhigh strictness. -## Version 0.7.1 - +Version 0.7.1 +--------------- * [#60](https://github.com/landscapeio/prospector/issues/60) Prospector did not work with Python2.6 due to timedelta.total_seconds() not being available. * Restored the behaviour where std_out/std_err from pylint is suppressed -## Version 0.7 - +Version 0.7 +--------------- * [#48](https://github.com/landscapeio/prospector/issues/48) If a folder is detected to be a virtualenvironment, then prospector will not check the files inside. * [#31](https://github.com/landscapeio/prospector/issues/31) Prospector can now check single files if passed a module as the path argument. * [#50](https://github.com/landscapeio/prospector/issues/50) Prospector now uses an exit code of 1 to indicate that messages were found, to make it easier for bash scripts and so on to fail if any messages are found. A new flag, `-0` or `--zero-exit`, turns off this behaviour so that a non-zero exit code indicates that prospector failed to run. @@ -289,24 +338,24 @@ argument * [#45](https://github.com/landscapeio/prospector/issues/45) Added vulture, a tool for finding dead code, as an optional tool. * [#24](https://github.com/landscapeio/prospector/issues/24) Added Sphinx documentation, which is now also [available on ReadTheDocs](http://prospector.readthedocs.org/) -## Version 0.6.4 - +Version 0.6.4 +--------------- * Fixed pylint system path munging again again -## Version 0.6.3 - +Version 0.6.3 +--------------- * Fixed dodgy tool's use of new file finder -## Version 0.6.2 - +Version 0.6.2 +--------------- * Fixed pylint system path munging again -## Version 0.6.1 - +Version 0.6.1 +--------------- * Fixed pylint system path munging -## Version 0.6 - +Version 0.6 +--------------- * Module and package finding has been centralised into a `finder.py` module, from which all tools take the list of files to be inspected. This helps unify which files get inspected, as previously there were several times when tools were not correctly ignoring files. * Frosted [cannot handle non-utf-8 encoded files](https://github.com/timothycrosley/frosted/issues/56) so a workaround has been added to simply ignore encoding errors raised by Frosted until the bug is fixed. This was deemed okay as it is very similar to pyflakes in terms of what it finds, and pyflakes does not have this problem. * [#43](https://github.com/landscapeio/prospector/issues/43) - the blender is now smarter, and considers that a message may be part of more than one 'blend'. This means that some messages are no longer duplicated. @@ -315,16 +364,16 @@ argument * [#37](https://github.com/landscapeio/prospector/issues/37) - profiles can now use the extension `.yml` as well as `.yaml` * [#34](https://github.com/landscapeio/prospector/issues/34) - south migrations are ignored if in the new south name of `south_migrations` (ie, this is compatible with the post-Django-1.7 world) -## Version 0.5.6 / 0.5.5 - +Version 0.5.6 / 0.5.5 +--------------------- * The pylint path handling was slightly incorrect when multiple python modules were in the same directory and importing from each other, but no `__init__.py` package was present. If modules in such a directory imported from each other, pylint would crash, as the modules would not be in the `sys.path`. Note that 0.5.5 was released but this bugfix was not correctly merged before releasing. 0.5.6 contains this bugfix. -## Version 0.5.4 - +Version 0.5.4 +--------------- * Fixing a bug in the handling of relative/absolute paths in the McCabe tool -## Version 0.5.3 - +Version 0.5.3 +--------------- ##### New Features * Python 3.4 is now tested for and supported @@ -334,14 +383,14 @@ argument * Module-level attributes can now be documented with a string without triggering a "String statement has no effect" warning * [#28](https://github.com/landscapeio/prospector/pull/28) Fixed absolute path bug with Frosted tool -## Version 0.5.2 - +Version 0.5.2 +--------------- ##### New Features * Support for new error messages introduced in recent versions of `pep8` and `pylint` was included. -## Version 0.5.1 - +Version 0.5.1 +--------------- ##### New Features * All command line arguments can now also be specified in a `tox.ini` and `setup.cfg` (thanks to [Jason Simeone](https://github.com/jayclassless)) @@ -353,14 +402,13 @@ argument * [#12](https://github.com/landscapeio/prospector/issues/12) Library support for Django now extends to all tools rather than just pylint * Some additional bugs related to ignore paths were squashed. -## Version 0.5 - +Version 0.5 +--------------- * Files and paths can now be ignored using the `--ignore-paths` and `--ignore-patterns` arguments. * Full PEP8 compliance can be turned on using the `--full-pep8` flag, which overrides the defaults in the strictness profile. * The PEP8 tool will now use existing config if any is found in `.pep8`, `tox.ini`, `setup.cfg` in the path to check, or `~/.config/pep8`. These will override any other configuration specified by Prospector. If none are present, Prospector will fall back on the defaults specified by the strictness. -* A new flag, `--external-config`, can be used to tweak how PEP8 treats external config. `only`, the default, means that external configuration will be preferred to Prospector configuration. `merge` means that Prospector will combine external configuration and its own -values. `none` means that Prospector will ignore external config. +* A new flag, `--external-config`, can be used to tweak how PEP8 treats external config. `only`, the default, means that external configuration will be preferred to Prospector configuration. `merge` means that Prospector will combine external configuration and its own values. `none` means that Prospector will ignore external config. * The `--path` command line argument is no longer required, and Prospector can be called with `prospector path_to_check`. @@ -368,13 +416,13 @@ values. `none` means that Prospector will ignore external config. * Prospector will now run under Python3. -## Version 0.4.1 - +Version 0.4.1 +--------------- * Additional blending of messages - more messages indicating the same problem from different tools are now merged together * Fixed the maximum line length to 160 for medium strictness, 100 for high and 80 for very high. This affects both the pep8 tool and pylint. -## Version 0.4 - +Version 0.4 +--------------- * Added a changelog * Added support for the [dodgy](https://github.com/landscapeio/dodgy) codebase checker * Added support for pep8 (thanks to [Jason Simeone](https://github.com/jayclassless)) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.rst similarity index 99% rename from CONTRIBUTORS.md rename to CONTRIBUTORS.rst index 59114093..c51798ff 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.rst @@ -1,5 +1,5 @@ Contributors -=== +------------ * Abdullah Hilson ([@abumalick](https://github.com/abumalick)) * Amir Rachum ([@Nurdok](https://github.com/Nurdok)) diff --git a/docs/_templates/globaltoc.html b/docs/_templates/globaltoc.html new file mode 100644 index 00000000..b2c24dcd --- /dev/null +++ b/docs/_templates/globaltoc.html @@ -0,0 +1,21 @@ +

{{ _('Table Of Contents') }}

+ + + +{%- if display_toc %} +
+ {{ toc }} +{%- endif %} + +
+Index +
\ No newline at end of file diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 00000000..adc917d8 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,52 @@ +{# + + Copied from: + + https://raw.githubusercontent.com/pallets/pallets-sphinx-themes/b0c6c41849b4e15cbf62cc1d95c05ef2b3e155c8/src/pallets_sphinx_themes/themes/pocoo/layout.html + + And removed the warning version (see #7331). + +#} + +{% extends "basic/layout.html" %} + +{% set metatags %} + {{- metatags }} + +{%- endset %} + +{% block extrahead %} + {%- if page_canonical_url %} + + {%- endif %} + + {{ super() }} +{%- endblock %} + +{% block sidebarlogo %} + {% if pagename != "index" or theme_index_sidebar_logo %} + {{ super() }} + {% endif %} +{% endblock %} + +{% block relbar2 %}{% endblock %} + +{% block sidebar2 %} + + {{- super() }} +{%- endblock %} + +{% block footer %} + {{ super() }} + {%- if READTHEDOCS and not readthedocs_docsearch %} + + {%- endif %} + {{ js_tag("_static/version_warning_offset.js") }} +{% endblock %} \ No newline at end of file diff --git a/docs/_templates/links.html b/docs/_templates/links.html new file mode 100644 index 00000000..bdfef441 --- /dev/null +++ b/docs/_templates/links.html @@ -0,0 +1,7 @@ +

Useful Links

+ \ No newline at end of file diff --git a/docs/_templates/relations.html b/docs/_templates/relations.html new file mode 100644 index 00000000..9d9a1ddb --- /dev/null +++ b/docs/_templates/relations.html @@ -0,0 +1,19 @@ +

Related Topics

+ \ No newline at end of file diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html new file mode 100644 index 00000000..d3b887e8 --- /dev/null +++ b/docs/_templates/sidebarintro.html @@ -0,0 +1,4 @@ +

About prospector

+

+ Prospector runs your favourite linters in a useful way +

\ No newline at end of file diff --git a/docs/_templates/slim_searchbox.html b/docs/_templates/slim_searchbox.html new file mode 100644 index 00000000..8797545b --- /dev/null +++ b/docs/_templates/slim_searchbox.html @@ -0,0 +1,15 @@ +{# + basic/searchbox.html with heading removed. +#} +{%- if pagename != "search" and builder != "singlehtml" %} + + +{%- endif %} \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 00000000..d0f1fde9 --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1,5 @@ +.. _`changelog`: + +.. include:: ../CHANGELOG.rst + + diff --git a/docs/conf.py b/docs/conf.py index f33996f5..a9198ba9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,10 @@ import os import sys +from prospector.__pkginfo__ import __version__ as version + +release = ".".join(version.split(".")[:2]) + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -28,7 +32,11 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinxarg.ext"] +extensions = [ + "sphinxarg.ext", + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", +] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -40,20 +48,19 @@ # source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = "index" +master_doc = "contents" # General information about the project. project = u"Prospector" -copyright = u"2014, Carl Crowder" +copyright = u"2014-2020, Carl Crowder" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = "1.1.4" -# The full version, including alpha/beta/rc tags. -release = "1.1.4" +# release = The short X.Y version. +# version = The full version, including alpha/beta/rc tags. +release = ".".join(version.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -78,7 +85,7 @@ # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -# add_module_names = True +add_module_names = False # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. @@ -98,7 +105,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "default" +html_theme = "alabaster" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -110,10 +117,10 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -# html_title = None +html_title = "prospector documentation" # A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None +html_short_title = "prospector-%s" % version # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -127,7 +134,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +# html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -143,17 +150,32 @@ # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -# html_sidebars = {} +html_sidebars = { + "index": [ + "slim_searchbox.html", + "sidebarintro.html", + "globaltoc.html", + "links.html", + "sourcelink.html", + ], + "**": [ + "slim_searchbox.html", + "globaltoc.html", + "relations.html", + "links.html", + "sourcelink.html", + ], +} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. -# html_domain_indices = True +html_domain_indices = True # If false, no index is generated. -# html_use_index = True +html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False diff --git a/docs/contents.rst b/docs/contents.rst new file mode 100644 index 00000000..6557104c --- /dev/null +++ b/docs/contents.rst @@ -0,0 +1,22 @@ +Contents +--------- + +.. toctree:: + :caption: Table of Contents + :maxdepth: 2 + :numbered: 1 + + index + usage + profiles + suppression + supported_tools + contrib + + +.. only:: html + + .. toctree:: + :maxdepth: 1 + + changelog \ No newline at end of file diff --git a/docs/contrib.rst b/docs/contrib.rst index 23097c8d..4551c71d 100644 --- a/docs/contrib.rst +++ b/docs/contrib.rst @@ -1,5 +1,5 @@ -Development and Contributing -============================ +Contributing +============ All contributions are very welcome! You can contribute in many ways: @@ -37,8 +37,17 @@ handling the output of other tools. However, please do run them before submittin nosetests tests/ -Prospector targets Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. You can use `tox`_ to test this locally, +Prospector targets Python 3.5, 3.6, 3.7 and 3.8. You can use `tox`_ to test this locally, and all tests are run on `travis-ci.org`_. .. _tox: https://tox.readthedocs.io/en/latest/ .. _travis-ci.org: https://travis-ci.org/PyCQA/prospector + +.. include:: ../CONTRIBUTORS.rst + +Developper Reference +-------------------- +.. toctree:: + :maxdepth: 2 + + reference diff --git a/docs/index.rst b/docs/index.rst index 8fe578b7..f2f12a79 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -24,7 +24,7 @@ About Prospector is a tool to analyse Python code and output information about errors, potential problems, convention violations and complexity. It brings together the functionality of other Python analysis tools such as `Pylint`_, `pep8`_, and `McCabe complexity`_. -See the :doc:`Supported Tools` section for a complete list. +See the :doc:`Supported Tools` section for a complete list of default and optional extra tools. The primary aim of Prospector is to be useful 'out of the box'. A common complaint of other Python analysis tools is that it takes a long time to filter through which errors are relevant @@ -40,20 +40,38 @@ and adapts the output depending on the libraries your project uses. Installation ------------ -You can install using ``pip``:: +You can install default tools using ``pip`` command:: pip install prospector -To install optional dependencies such as ``pyroma``:: + +For a full list of optional extra tools, and specific examples to install each of them, +see the :doc:`page on supported tools `. + +For example to install an optional tool such as ``pyroma``:: pip install prospector[with_pyroma] -Some shells (such as ``Zsh``, the default shell of macOS Catalina) require brackets to be escaped:: +.. Note:: Some shells (such as ``Zsh``, the default shell of macOS Catalina) require brackets to be escaped + :: + + pip install prospector\[with_pyroma\] + + +To install two or more optional extra tools at the same time, they must be comma separated (and without spaces). +For example to install mypy and bandit:: + + pip install prospector[with_mypy,with_bandit] + + +And to install all optional extra tools at the same time, install prospector using the ``with_everything`` option:: + + pip install prospector[with_everything] + + - pip install prospector\[with_pyroma\] -For a full list of optional extras, see the :doc:`page on supported tools `. For best results, you should install prospector to the same place as your project and its dependencies. That is, if you are using virtual environments, install pip into that virtual environment alongside your code. This @@ -138,23 +156,3 @@ License Prospector is available under the GPLv2 License. - -Contents: - -.. toctree:: - :maxdepth: 1 - - usage - profiles - suppression - supported_tools - contrib - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/profiles.rst b/docs/profiles.rst index 561d4b01..a60d1bc5 100644 --- a/docs/profiles.rst +++ b/docs/profiles.rst @@ -1,5 +1,5 @@ -Profiles -======== +Profiles / Configuration +======================== The behaviour of prospector can be configured by creating a profile. A profile is a YAML file containing several sections as described below. @@ -80,11 +80,34 @@ Builtin Profiles Prospector comes with several built-in profiles, which power some of strictness and style options. You can see the `full list on GitHub `_. +Global Configuration options +---------------------------- +Global configuration options for tools are the following: + +* output-format_ +* strictness_ +* test-warnings_ +* doc-warnings_ +* member-warnings_ +* inherits_ +* ignore-paths_ +* ignore-patterns_ +* autodetect_ +* uses_ +* max-line-length_ + + +.. _output-format: + +Output-format +............. +Same command line options are available. +See :doc:`Output format ` .. _strictness: Strictness -`````````` +.......... There is a command line argument to tweak how picky Prospector will be:: @@ -102,12 +125,11 @@ strictness value, then the default of 'medium' will be used. To avoid using any strictness profiles, set ``strictness: none``. -Tweaking Certain Aspects -```````````````````````` There are some aspects of analysis which can be turned on or off separately from the strictness or -individual tuning of the tools. +individual tuning of the tools. Example: +.. _doc-warnings: Documentation Warnings ...................... @@ -121,6 +143,7 @@ your profile:: This will turn on the otherwise disabled ``pep257`` tool. +.. _test-warnings: Test Warnings ............. @@ -130,9 +153,10 @@ turn this on using the ``--test-warnings`` flag or in your profile:: test-warnings: true +.. _member-warnings: Member Warnings -''''''''''''''' +............... Pylint generates warnings when you try to access an attribute of a class that does not exist, or import a module that does not exist. Unfortunately it is not always accurate and in some projects, @@ -142,45 +166,8 @@ but you can turn it on using the ``--member-warnings`` flag or in a profile:: member-warnings: true -Pylint Plugins -''''''''''''''' - -It is possible to specify list of plugins for Pylint. You can do this by using ``load-plugins`` -option in ``pylint`` section:: - - pylint: - load-plugins: - - plugin - - plugin - -Note that this option doesn't affect loading of :ref:`autodetected plugins `. - - -PEP8 Control -............ - -The strictness will turn on or off different messages generated by the `pep8.py `_ -tool depending on how picky they are. However, if you want to have the standard 'medium' strictness but get either -complete or zero pep8 style warnings, you can use a shorthand like below:: - - pep8: - full: true - -Or:: - - pep8: - none: true - -Note that this section is also the section for configuring the pep8 tool, see below. Therefore you can turn -on all warnings from pep8 but turn off just one or two individually or otherwise tweak the tool like so:: - - pep8: - full: true - disable: - - E126 - options: - max-line-length: 120 - +.. _uses: +.. _autodetect: Libraries Used and Autodetect ............................. @@ -204,9 +191,10 @@ If prospector is incorrectly deciding that you use one of these, you can turn of autodetect: false +.. _inherits: Inheritance ------------ +........... Profiles can inherit from other profiles, and can inherit from more than one profile. Prospector merges together all of the options in each profile, starting at the top @@ -236,9 +224,11 @@ built-in prospector profiles:: inherits: - strictness_medium +.. _ignore-paths: +.. _ignore-patterns: -Ignoring Paths --------------- +Ignoring Paths and patterns +........................... There are two ways to ignore paths or files. @@ -257,17 +247,25 @@ Note that a further option called ``ignore`` is available. This is equivalent to an older version of the configuration. It will continue working, but it is deprecated, and you should update your profile if you are using it. +.. _max-line-length: + +Max Line Length +............... +This general option, provides a way to select maximum line length allowed. -Tool Configuration ------------------- +.. Note:: This general option overrides and takes precedence over same option in a particular tool (pep8 or pylint) + + + +Individual Configuration Options +-------------------------------- Each tool can be individually configured with a section beginning with the tool name -(in lowercase). Valid values are -``pylint``, ``pep8``, ``mccabe``, ``dodgy``, ``pyflakes``, ``frosted``, -``vulture`` and ``pyroma``. +(in lowercase). Valid values are ``bandit``, ``dodgy``, ``frosted``, ``mccabe``, ``mypy``, ``pep257``, ``pep8``, +``pyflakes``, ``pylint``, ``pyroma`` and ``vulture``. Enabling and Disabling Tools -```````````````````````````` +............................ There are :doc:`7 default and 5 optional `. Unless otherwise configured, the defaults are enabled and the optional tools are disabled. @@ -281,7 +279,7 @@ Note that the ``--tools`` :doc:`command line argument ` overrides profile Enabling and Disabling Messages -``````````````````````````````` +............................... Messages can be enabled or disabled using the tool's code for the output. These codes are either from the tool itself, or provided by prospector for those tools which do not have @@ -302,9 +300,47 @@ However, you can also enable messages which were disabled by parent profiles:: - method-hidden - access-member-before-definition +Pylint Plugins +.............. + +It is possible to specify list of plugins for Pylint. You can do this by using ``load-plugins`` +option in ``pylint`` section:: + + pylint: + load-plugins: + - plugin + - plugin + +Note that this option doesn't affect loading of :ref:`autodetected plugins `. + + +PEP8 Control +............ + +The strictness will turn on or off different messages generated by the `pep8.py `_ +tool depending on how picky they are. However, if you want to have the standard 'medium' strictness but get either +complete or zero pep8 style warnings, you can use a shorthand like below:: + + pep8: + full: true + +Or:: + + pep8: + none: true + +Note that this section is also the section for configuring the pep8 tool, see below. Therefore you can turn +on all warnings from pep8 but turn off just one or two individually or otherwise tweak the tool like so:: + + pep8: + full: true + disable: + - E126 + options: + max-line-length: 120 Tool Options -```````````` +............ Some tools can be further configured or tweaked using an options hash:: @@ -314,15 +350,131 @@ Some tools can be further configured or tweaked using an options hash:: The available options are: -+-----------+------------------+----------------------------------------------+ -| Tool + Option Name + Possible Values | -+===========+==================+==============================================+ -| mccabe | max-complexity | Maximum number of paths allowed in a method | -+-----------+------------------+----------------------------------------------+ -| pep8 | max-line-length | Maximum line length allowed | -+-----------+------------------+----------------------------------------------+ -| pylint | -anything- | Any of the `pylint options`_ | -+-----------+------------------+----------------------------------------------+ ++---------+------------------------+----------------------------------------------+ +| Tool + Option Name + Possible Values | ++=========+========================+==============================================+ +| mccabe | max-complexity | Maximum number of paths allowed in a method | ++---------+------------------------+----------------------------------------------+ +| pep8 | max-line-length | Maximum line length allowed (This option is | +| | | overriden by global option max-line-length_) | ++---------+------------------------+----------------------------------------------+ +| pylint | -anything- | Any of the `pylint options`_ | ++---------+------------------------+----------------------------------------------+ +| mypy | strict | strict mode | ++---------+------------------------+----------------------------------------------+ +| mypy | follow.imports | How to treat imports | ++---------+------------------------+----------------------------------------------+ +| mypy | ignore-missing-import | Silently ignore imports of missing modules | ++---------+------------------------+----------------------------------------------+ +| mypy | platform | Check for the given platform | ++---------+------------------------+----------------------------------------------+ +| mypy | python-version | assume it will be running on Python x.y | ++---------+------------------------+----------------------------------------------+ +| mypy | strict-optional | Checking of Optional types and None values | ++---------+------------------------+----------------------------------------------+ +| bandit | config | configuration filename | ++---------+------------------------+----------------------------------------------+ +| bandit | profile | profile to use | ++---------+------------------------+----------------------------------------------+ +| bandit | severity | report only issues of a given severity | ++---------+------------------------+----------------------------------------------+ +| bandit | confidence | report only issues of a given confidence | ++---------+------------------------+----------------------------------------------+ + +See `mypy options`_ for more details +See `bandit options`_ for more details + .. _pylint options: https://pylint.readthedocs.io/en/latest/user_guide/run.html +.. _bandit options: https://https://bandit.readthedocs.io/en/latest/config.html +.. _mypy options: https://https://bandit.readthedocs.io/en/latest/config.html + + + +Example +------- + +Next is another example using most options:: + + output-format: json + + strictness: medium + test-warnings: true + doc-warnings: false + member-warnings: false + inherits: + - default + ignore-paths: + - docs + ignore-patterns: + - (^|/)skip(this)?(/|$) + autodetect: true + max-line-length: 88 + + bandit: + run: true + options: + config: .bandit.yml + + dodgy: + run: true + + frosted: + disable: + - E103 + - E306 + + mccabe: + run: false + options: + max-complexity: 10 + + pep8: + disable: + - W602 + - W603 + enable: + - W601 + options: + max-line-length: 79 + + pep257: + disable: + - D100 + - D101 + + pyflakes: + disable: + - F403 + - F810 + + pylint: + disable: + - bad-builtin + - too-few-public-methods + options: + max-locals: 15 + max-returns: 6 + max-branches: 15 + max-statements: 60 + max-parents: 7 + max-attributes: 7 + min-public-methods: 1 + max-public-methods: 20 + max-module-lines: 1000 + max-line-length: 99 + + pyroma: + disable: + - PYR15 + - PYR18 + + mypy: + run: true + options: + ignore-missing-imports: true + follow-imports: skip + + vulture: + run: true \ No newline at end of file diff --git a/docs/reference.rst b/docs/reference.rst new file mode 100644 index 00000000..2ca87525 --- /dev/null +++ b/docs/reference.rst @@ -0,0 +1,73 @@ +Tool classes +========================= + +*Contents are subject to change.* + + +:class:`ToolBase` +------------------ + +.. autoclass:: prospector.tools.base.ToolBase + :members: + +:class:`BanditTool` +------------------- +.. autoclass:: prospector.tools.bandit.BanditTool + :members: + +:class:`DodgyTool` +------------------- +.. autoclass:: prospector.tools.dodgy.DodgyTool + :members: + +:class:`FrostedTool` +-------------------- +.. autoclass:: prospector.tools.frosted.FrostedTool + :members: + +:class:`McCabeTool` +------------------- +.. autoclass:: prospector.tools.mccabe.McCabeTool + :members: + +:class:`MypyTool` +------------------- +.. autoclass:: prospector.tools.mypy.MypyTool + :members: + +:class:`Pep8Tool` +------------------- +.. autoclass:: prospector.tools.pep8.Pep8Tool + :members: + +:class:`Pep257Tool` +------------------- +.. autoclass:: prospector.tools.pep257.Pep257Tool + :members: + +:class:`ProfileValidationTool` +------------------------------ +.. autoclass:: prospector.tools.profile_validator.ProfileValidationTool + :members: + +:class:`PyFlakesTool` +--------------------- +.. autoclass:: prospector.tools.pyflakes.PyFlakesTool + :members: + +:class:`PylintTool` +------------------- +.. autoclass:: prospector.tools.pylint.PylintTool + :members: + +:class:`PyromaTool` +------------------- +.. autoclass:: prospector.tools.pyroma.PyromaTool + :members: + +:class:`VultureTool` +-------------------- +.. autoclass:: prospector.tools.vulture.VultureTool + :members: + + diff --git a/docs/requirements.txt b/docs/requirements.txt index 56f5ee78..7476509d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -sphinx +sphinx>=3.1,<4 sphinx-argparse diff --git a/docs/supported_tools.rst b/docs/supported_tools.rst index 046d2269..af0914bd 100644 --- a/docs/supported_tools.rst +++ b/docs/supported_tools.rst @@ -27,21 +27,21 @@ Defaults -------- `Pylint `_ -````````````````````````````````` +``````````````````````````````````` Pylint is the most comprehensive static analysis tool for Python. It is extremely thorough and is the source of most messages that prospector outputs. -`pep8.py `_ +`Pep8 `_ ``````````````````````````````````````````````````` -``pep8.py`` is a simple tool to warn about violations of the +Pep8 is a simple tool to warn about violations of the `PEP8 style guide `_. It produces messages for any divergence from the style guide. Prospector's concept of :doc:`strictness ` turns off various warnings depending on the strictness level. By default, several PEP8 errors will be -supressed. To adjust this without adjusting the strictness of other tools, you have +suppressed. To adjust this without adjusting the strictness of other tools, you have some options:: # turn off pep8 checking completely: @@ -55,14 +55,14 @@ some options:: prospector --max-line-length 120 -`pyflakes `_ +`Pyflakes `_ ```````````````````````````````````````````` Pyflakes analyzes programs and detects various errors. It is simpler and faster than pylint, but also not as thorough. -`mccabe `_ +`Mccabe `_ ``````````````````````````````````````````````` `McCabe or cyclomatic complexity `_ is a measurement of how many paths there are in a given function or method. It measures how @@ -71,17 +71,17 @@ are too complex are prone to logic errors, and should be refactored to a series methods. -`dodgy `_ +`Dodgy `_ ``````````````````````````````````````````````` Dodgy is a very simple tool designed to find 'dodgy' things which should not be in a public project, such as secret keys, passwords, AWS tokens or source control diffs. -`pydocstyle `_ -```````````````````````````````````````````````` +`Pydocstyle / Pep257 `_ +```````````````````````````````````````````````````````````` -``pydocstyle`` is a simple tool to warn about violations of the +Pydocstyle is a simple tool to warn about violations of the `PEP257 Docstring Conventions `_. It produces messages for any divergence from the style guide. @@ -93,8 +93,10 @@ exactly as ``pydocstyle`` expects it. It will not run by default, and must be enabled explicitly (via ``--with-tool pep257`` or in a :doc:`profile `) or implicitly (using the ``--doc-warnings`` flag). +.. Note:: Pep257 is the name used for this tool from now on this documentation + -`profile-validator` +`Profile-validator` ``````````````````` This is a simple tool built in to prospector which validates @@ -110,13 +112,7 @@ These extras are integrated into prospector but are not activated by default. This is because their output is not necessarily useful for all projects. They are also not installed by default. The instructions for installing each tool is in the tool -section below. To install all extras at the same time, install prospector using the ``with_everything`` option:: - - pip install prospector[with_everything] - -Some shells (such as ``Zsh``, the default shell of macOS Catalina) require brackets to be escaped:: - - pip install prospector\[with_everything\] +section below. For more detailed information on installing, see :doc:`install section`. `Pyroma `_ ```````````````````````````````````````````````` @@ -145,7 +141,7 @@ To install and use:: prospector --with-tool vulture -`frosted `_ +`Frosted `_ `````````````````````````````````````````````````````` Frosted is a fork of pyflakes which was created with the intention of taking over from and extending pyflakes as development had slowed. Since Prospector was originally @@ -158,7 +154,7 @@ To install and use:: prospector --with-tool frosted -`mypy `_ +`Mypy `_ `````````````````````````````````````````````````````` Mypy is an experimental optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing. Mypy combines the @@ -172,7 +168,7 @@ To install and use:: -`bandit `_ +`Bandit `_ `````````````````````````````````````````````````````` Bandit finds common security issues in Python code. diff --git a/docs/usage.rst b/docs/usage.rst index 23cc115b..6e98a0cf 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -3,10 +3,12 @@ Command Line Usage .. _issue_16: https://github.com/PyCQA/prospector/issues/16 .. _vscode_python_plugin: https://marketplace.visualstudio.com/items?itemName=donjayamanne.python + The simplest way to run prospector is from the project root with no arguments. It will try to figure everything else out itself and provide sensible defaults:: prospector + You can specify a path to check:: prospector path/to/my/package