Saravanan666/pypi-org huggingface dataset:
Package: pylint-module-boundaries
pylint module boundariesa pylint plugin to enforce boundaries between modules in your project. similar to nx'senforce-module-boundarieseslint pluginexamplesay you have three packages in your project -common,package1, andpackage2- you can use thebanned-importsrule to preventcommonfrom importing anything frompackage1orpackage2, thus avoiding issues such as circular dependencies.Pylint can then be used to detect any violations of this rule:seeusagebelow for a config exampleinstallingpoetry install pylint-module-boundariesusagepyproject.tomlexample[tool.pylint.MASTER]load-plugins="pylint_module_boundaries"banned-imports='''{"common(\\..*)?": ["package1(\\..*)?", "package2(\\..*)?"],"scripts(\\..*)?": ["package1(\\..*)?", "package2(\\..*)?"]}'''banned-imports-check-usages=trueoptionsoptiontypedescriptiondefaultbanned-importsstringa JSON object pairing regexes matching modules to arrays of regexes matching modules that they are not allowed to import from. due to the limitations in config types allowed by pylint, this has to be a JSON object represented as a string.note that these regexes must be a full match, so to match any submodules you should append(\\..*)?to the regex (double\required because it's JSON).yes, i know this option is quite annoying to use but its purpose is to be as flexible as possible. i plan to add an easier to use option in the future that covers most basic use cases. seethis issue{}banned-imports-check-usagesbooleanwhether usages of the imports should be checked as well as the imports themselves. works on imports of entire modules but can potentially cause false positives depending on your use casetrue
Package: pylint-mongoengine
Pylint-mongoengine is a pylint plugin for mongoengine and mongomotor. Inspired
by the pylint-django plugin.InstallInstall it using pip:$pipinstallpylint-mongoengineUsageFrom the command line use the--load-pluginsparameter:$pylint--load-plugins=pylint_mongoenginemycode/or addload-plugins=pylint_mongoengineto your pylintrc fileHow to use in VS-Code:Open the Command Palette (⇧⌘P), then typePreferences: Configure Language Specific Settings, select Python and add the following code:"python.linting.pylintArgs":["--load-plugins=pylint_mongoengine"]
Package: pylint-nautobot
Pylint NautobotAn collection of code linting rules forNautobot.OverviewThis project contains custompylintrules for lintingNautobotand its Apps.DocumentationFull documentation for this project can be found over on theNautobot Docswebsite:Getting Started.Development.Release Notes / Changelog.Frequently Asked Questions.Contributing to the DocumentationYou can find all the Markdown source for the project documentation under thedocsfolder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.If you need to view the fully-generated documentation site, you can build it withMkDocsby runninginvoke docsin your local development environment. As your changes to the documentation files are saved, they will be automatically rebuilt and any pages currently being viewed will be reloaded in your browser.Any PRs with fixes or improvements are very welcome!QuestionsFor any questions or comments, please check theFAQfirst. Feel free to also swing by theNetwork to Code Slack(channel#nautobot), sign uphereif you don't have an account.
Package: pylint-patcher
Pylint addon to store lint exceptions in a patchfile.OverviewPylint can be a bit noisy with false positives. By default, these can be ignored by:Disabling warnings inline (littering your code with “# pylint: disable=” pragmas)Disabling warnings globally (causing real problems to be missed)Accepting a low Pylint scorePylint Patcherprovides another solution:Individual lint exceptions are stored in a patchfile (.pylint-disable.patch)The patchfile is applied to the source before Pylint is runThe patchfile is removed from the source after Pylint completesInstallationpip install pylint-patcherUsageRunning Pylint PatcherPylint Patcheris run in exactly the same manner as Pylint. It accepts all the same arguments:pylint-patcher path/to/package_or_moduleThis applies the patchfile (if it exists), runs Pylint, then removes the patchfile.For more details, use the--helpoption.Creating a PatchfileThe easiest way to create and maintain a patchfile is to use thepylint-patcher-guitool:pylint-patcher-guiThis runs a modified version ofpylint-gui, allowing Pylint warnings to be added to the patchfile:Open a module or package, and clickRun.Once the lint completes, double-click the warnings in the bottom pane to show them in the source pane.If a warning is invalid, right-click it and selectAdd to ignore patchfile.Once you’re finished, clickRunagain, and confirm that the warnings have been disabled.DevelopmentAll development takes place at thePylint Patcher GitHub site.
Further information about Pylint can be found at thePylint Bitbucket site.
Package: pylint-peewee
# pylint-peewee## ForewardDo you use PeeWee? Do you also use PyLint? And the PeeWee flask_util?Are you tired of getting PyLint errors like:`*************Module application.models.base E: 32,15: Class 'BaseModel' has no 'get' member(no-member)E: 45,16: Class 'BaseModel' has no 'select' member(no-member)*************Module application.models.client_settings E: 40,19: Class 'Settings' has no 'create' member(no-member)E: 53,12: Class 'Settings' has no 'select' member(no-member)E: 68,23: Class 'Settings' has no 'select' member(no-member)E: 81,17: Class 'Settings' has no 'select' member(no-member)`Just because you’re using flask_util?If so, this is the plugin for you!## How it WorksThis plugin works very simply by hooking into ASTroid’s Class Parser, seeing if
the current class has a base of: db.Model (the standard for flask_util) and, if
so, it stubs out all the missing methods of: ‘create’, ‘select’, ‘update’, etc.The methods are stubbed out by returning a class with the proper members, which
are all functions with apassimplementation.## TODOMake the base class configurable, so you can use Model, MyModel, peewee.Model, what have you.
Package: pylint-per-file-ignores
Pylint Per File Ignores 😲This pylint plugin will enable per-file-ignores in your project!Install# w/ poetry
poetry add --dev pylint-per-file-ignores

# w/ pip
pip install pylint-per-file-ignoresAdd to Pylint Settings[tool.pylint.MASTER]load-plugins=["pylint_per_file_ignores",...]UsageAdd list of patterns and codes you would like to ignore.Using native pylint settingsSection "MESSAGES CONTROL". Examples:# setup.cfg[pylint.MESSAGES CONTROL]per-file-ignores=/folder_1/:missing-function-docstring,W0621,W0240,C0115file.py:C0116,E0001# pyproject.toml[tool.pylint.'MESSAGES CONTROL']per-file-ignores=["/folder_1/:missing-function-docstring,W0621,W0240,C0115","file.py:C0116,E0001"]Using custompyproject.tomlsectionFor backwards compatibility only. Example:[tool.pylint-per-file-ignores]"/folder_1/"="missing-function-docstring,W0621,W0240,C0115""file.py"="C0116,E0001"ThanksTo pylint :) And the pluginpylint-djangowho produced most of the complex code.ContributingThis repo uses commitizen and semantic release. Please commit usingnpm run commit.
Package: pylint-plugin-utils
pylint-plugin-utilsStatusAboutUtilities and helpers for writing Pylint plugins. This is not a direct Pylint plugin, but rather a set of tools and functions used by other plugins such aspylint-djangoandpylint-celery.TestingCreate virtualenv:python3.8-mvenv.pylint-plugin-utilssource.pylint-plugin-utils/bin/activate
pipinstall--upgradepipsetuptoolsWe usetoxfor running the test suite. You should be able to install it with:pipinstalltoxpytestTo run the test suite for a particular Python version, you can do:tox-epy38To run individual tests withtox, you can do:tox-epy38---ktest_linter_should_be_pickleableWe usepytestfor testingpylint, which you can use without usingtoxfor a faster development cycle.If you want to run tests on a specific portion of the code withpytest,pytest-covand your local python version::pipinstallpytest-cov# Everything:python3-mpytesttests/--cov=pylint_plugin_utils
coveragehtmlLicensepylint-plugin-utilsis available under the GPLv2 License.
Package: pylint-plus
pylint-plusPylint plugin with good practices extensionsRunningThis is a pylint plugin, so for running it you will need to load the plugin.➜ pylint --load-plugins pylint_plus my_source_code.pyCheckersThis plugin implements several checkers.Magic constantbeforeThis checker detects magic constants in code.
Magic constants are a code smell and should be replaced by meaningful named constants.example.py"""Example file"""defmethod_return_magic_constant():"""Example method"""return42when running lint would yield▶ pylint --load-plugins=pylint_plus example.py
************* Module test
test.py:4:11: R1001: Magic constant found (magic-constant)

------------------------------------------------------------------
Your code has been rated at 5.00/10 (previous run: 5.00/10, +0.00)after"""Example file"""UNIVERSE_ULTIMATE_QUESTION_ANSWER=42defmethod_return_magic_constant():"""Example method"""returnUNIVERSE_ULTIMATE_QUESTION_ANSWERrunning lint again yields▶ pylint --load-plugins=pylint_plus example.py

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)ConfigurationYou may tweak the checker to be more or less strict. For this checker,
we have the following options available.OptionResultallow-return-constantsAllow returning constantsallow-compare-constantsAllow comparing constantsallow-binary-constantsAllow binary operation with constantsallow-call-args-constantsAllow call args to be constantsallow-subscript-constantsAllow subscript args to be constantsallow-int-constantsIgnore int constantsallow-str-constantsIgnore string constantsallow-float-constantsIgnore float constantsBooleantypes are ignored by this checker.Return methodTO BE DOCUMENTEDFunction/Method orderTO BE DOCUMENTEDYou may find other examples at theexample/directoryChangelogv0.0.2Initial implementation of theFunction/Method orderchecker.FixReturn Methodchecker unit testsv0.0.1Initial implementation of theMagic constantchecker.Initial implementation of theReturn methodchecker.
Package: pylint-print
Pylint Print CheckerA Pylint plugin for checking for use of theprint()function in Python.InstallationThe best way to install Pylint Print is to use pip as follows:pipinstallpylint-printExample UsageThis simple program is saved ashello_world.py:"""a module to demonstrate the pylint-print checker"""if__name__=="__main__":print("Hello, World!")In order to use pylint-print, this must be included as a plug in there are two main ways to do
this. The first method is to use the command line options:pylinthello_world.py--load-plugins=pylint_printThis will provide a response that should look like this:************* Module hello_world
hello_world.py:6:4: W8201: Logging should be used instead of the print() function. (print-function)

-----------------------------------
Your code has been rated at 5.00/10The other main way to use pylint is with a configuration file. Refer to thePylint Documentationfor more details about the
configuration files and how to set one up.The configuration file should have aload-pluginkey which will need thepylint_printadded
as follows:# List of plugins (as comma separated values of python module names) to load,# usually to register additional checkers.load-plugins=pylint_printOnce the plugin has been added to the configuration file it is no long necessary to add it to thepylintexecution, for example:pylinthello_world.pyWhy warn aboutprintusageprintstatements  are often the first thing a developer learns, they are useful to add to your
code when developing to understand how it works and debug problems.However, as a project grows they can become problematic, it is much better to use a logger that
allows:Log messages to be filtered by type or moduleLog messages can be redirected to other places rather than the console e.g. a fileFor these reasons some projects may want to restrict the usage ofprintin their coding rules
and make a check as part of the linting checks to avoid needing manual reviewsFurther InformationView onPyPi
Package: pylint-protobuf
pylint-protobufpylint-protobufis a Pylint plugin for making Pylint aware of generated
fields from Protobuf types.InstallInstall from PyPI via:pip install pylint-protobufAdd or updatepylintrcto loadpylint-protobuf:[MASTER]
load-plugins=pylint_protobufExample$ cat <<EOF >person.proto
message Person {
  required string name = 1;
}
EOF
$ protoc person.proto --python_out=.
$ cat <<EOF >readme.py
from person_pb2 import Person
p = Person('all arguments must be kwargs')
p.invalid_field = 'value'
p.name = 123
EOF
$ pip install pylint-protobuf
$ pylint --load-plugins=pylint_protobuf readme.py
************* Module readme
readme.py:2:4: E5904: Positional arguments are not allowed in message constructors and will raise TypeError (protobuf-no-posargs)
readme.py:3:0: E5901: Field 'invalid_field' does not appear in the declared fields of protobuf-generated class 'Person' and will raise AttributeError on access (protobuf-undefined-attribute)
readme.py:4:0: E5903: Field "Person.name" is of type 'str' and value 123 will raise TypeError at runtime (protobuf-type-error)Supported Python Versionspylint-protobufsupports Python 3.8 at a minimum.Known Issuespylint-protobufdoes not currently support the following concepts:Some features of extensions: non-nested extensions, HasExtension(),
ClearExtension(), type checkingAlternativesmypy-protobufAprotoccompiler plugin for generating.pyistubs from.protofiles.
Fully-featured and well supported, a useful extension to amypyworkflow.
May be better suited to your usecase if you control the entire pipeline. Maynotbe suited if you are a downstream consumer of generated_pb2.pymodules
with no access to the original.protodefinitions, in which casepylint-protobufmay be better suited for your use.
Package: pylint-pydantic
pylint-pydanticA Pylint plugin to help Pylint understand the PydanticHow to useInstallationpipinstallpylint-pydanticUse in consolepylint--load-pluginspylint_pydanticxxxxxUse in vscode,settings.json add item"pylint.args":["--load-plugins","pylint_pydantic"]# in old vscode version maybe"python.linting.pylintArgs":["--load-plugins","pylint_pydantic"]Testspylint--rcfile=pylintrc--load-pluginspylint_pydantictests/------------------------------------Yourcodehasbeenratedat10.00/10FAQHow to resolvepylint: No name ‘BaseModel’ in module ‘pydantic’?Add–extension-pkg-whitelist=’pydantic’parameter (see#1961)OtherIf you have any questions, please create a issue.https://github.com/fcfangcc/pylint-pydantic/issuesChangelogv0.3.1: fixed #29v0.3.0: support pylint3v0.2.4: fix pydantic.Field with BaseModel supportv0.2.2: fix model_validator keywordmode, pydatic>=2.0.3v0.2.1: supportmodel_validatorv0.2.0: support Pydantic V2
Package: pylint-pytest
pylint-pytestA Pylint plugin to suppress pytest-related false positives.InstallationRequirements:pylintpytest>=4.6To install:$pipinstallpylint-pytestUsageEnable via command line option--load-plugins$pylint--load-pluginspylint_pytest<path_to_your_sources>Or in.pylintrc:[MASTER]load-plugins=pylint_pytestSuppressed Pylint Warningsunused-argumentFP when a fixture is used in an applicable function but not referenced in the function body, e.g.deftest_something(conftest_fixture):# <- Unused argument 'conftest_fixture'assertTrueunused-importFP when an imported fixture is used in an applicable function, e.g.fromfixture_collectionsimport(imported_fixture,)# <- Unused imported_fixture imported from fixture_collectionsdeftest_something(imported_fixture):...redefined-outer-nameFP when an imported/declared fixture is used in an applicable function, e.g.fromfixture_collectionsimportimported_fixturedeftest_something(imported_fixture,):# <- Redefining name 'imported_fixture' from outer scope (line 1)...no-memberFP when class attributes are defined in setup fixturesimportpytestclassTestClass(object):@staticmethod@pytest.fixture(scope="class",autouse=True)defsetup_class(request):cls=request.clscls.defined_in_setup_class=Truedeftest_foo(self):assert(self.defined_in_setup_class)# <- Instance of 'TestClass' has no 'defined_in_setup_class' memberRaise new warning(s)W6401deprecated-pytest-yield-fixtureRaise when using deprecated@pytest.yield_fixturedecorator (ref)importpytest@pytest.yield_fixture# <- Using a deprecated @pytest.yield_fixture decoratordefyield_fixture():yieldW6402useless-pytest-mark-decoratorRaise when using every@pytest.mark.*for the fixture (ref)importpytest@pytest.fixturedefawesome_fixture():...@pytest.fixture@pytest.mark.usefixtures("awesome_fixture")# <- Using useless `@pytest.mark.*` decorator for fixturesdefanother_awesome_fixture():...W6403deprecated-positional-argument-for-pytest-fixtureRaise when using deprecated positional arguments for fixture decorator (ref)importpytest@pytest.fixture("module")# <- Using a deprecated positional arguments for fixturedefawesome_fixture():...F6401cannot-enumerate-pytest-fixturesRaise when the plugin cannot enumerate and collect pytest fixtures for analysisNOTE: this warning is only added to test modules (test_*.py/*_test.py)importno_such_package# <- pylint-pytest plugin cannot enumerate and collect pytest fixturesChangelogSeeCHANGELOG.Licensepylint-pytestis available underMIT license.
Package: pylint-reenable
pylint-reenableA tool (and pre-commit hook) to automatically remove unnecessary# pylint: disablecomments, for example: a check that's no longer applicable (say you increased your
max line length), a mistake (# pylint: disableadded to a line that wasn't failing),
or other code in the file caused it to no longer need a# pylint: disable(such as an unused import).NOTE: this is lifted fromyesqa, whose license is included here (as per its terms).Installationpip install pylint-reenableCommand-line example$pylint-reenablemy_file.pyAs a pre-commit hookSeepre-commitfor instructionsSample.pre-commit-config.yaml:-repo:https://github.com/MarcoGorelli/pylint-reenablerev:v0.1.4hooks:-id:pylint-reenableIf you need to select a specific version of pylint and/or run with specific
pylint plugins, add them toadditional_dependencies.
Package: pylint-report
pylint-reportGenerates an HTML report summarizing the results ofpylint.InstallationThe recommended way to installpylint-reportis usingpipinstallpylint-reportor, for a development version (with all optional dependencies):pipinstallpylint-report[dev]QuickstartPlace the following in.pylintrc[MASTER]load-plugins=pylint_report[REPORTS]output-format=pylint_report.CustomJsonReporteror place the following inpyproject.toml[tool.pylint.MASTER]load-plugins="pylint_report"[tool.pylint.REPORTS]output-format="pylint_report.CustomJsonReporter"or manually pass the--load-pluginsand--output-formatflags.A two-step approach:pylint path/to/code > report.json: generate a (custom)jsonfile usingpylintpylint_report.py report.json-oreport.html: generate html reportOr alternativelypylint path/to/code | pylint_report.py > report.htmlBased onhttps://github.com/Exirel/pylint-json2htmlhttps://stackoverflow.com/a/57511754
Package: pylint-requests
pylint-requestsDescriptionApylintplugin to check for common issues with usage ofrequests.Currently the following errors are reported:F7801 (requests-not-available)Reported if this plugin failed to importrequests.
This means that: (a) you are runningpylintwith incorrectPYTHONPATH,
(b) you forgot to installrequests, or (c) you aren't usingrequestsand don't
need the plugin.E7801 (request-without-timeout)Reported if a HTTP call (e.g.requests.get) without a timeout is detected.Installationpip install pylint-requestsUsageUse pylint's--load-pluginsoption to enable the plugin:pylint --load-plugins=pylint_requests <your_code>For developersInstall deps and setup pre-commit hookmake initRun linters, autoformat, tests etc.make format lint testBump new versionmake bump_major
make bump_minor
make bump_patchLicenseMITChange LogUnreleased...0.1.1 - 2020-05-07fix crash withAttributeInferenceErroron optional function parameters0.1.0 - 2019-04-14initial
Package: pylint-restricted-imports
Aboutpylint-restricted-importsisPylintplugin for restricting
what imports are allowed in specific module trees.
Want to prevent django from being imported in a flask app? This plugin is for you!UsageEnsurepylint-restricted-importsis installed and on your path, and then run pylint using
pylint-restricted-imports as a plugin:pip install pylint-restricted-imports
pylint --load-plugins pylint_restricted_imports [..your module..]ConfigurationBefore the plugin will do anything, it needs configuring.
You can use pylint to generate the default configuration:pylint --load-plugins pylint_restricted_imports --generate-rcfileYou will end up with a block similar to below:[RESTRICTED-IMPORT]
# Colon/semicolon-delimited sets of names that determine what modules are
# allowed to be imported from another module
restricted-imports=

# Check restricted imports recursively
restricted-import-recurse=noRestricted Importsrestricted-importsis a csv list of module/restricted imports. The format is<module>:<restrictedmodule>;....
For example, the following would preventrestricted1andrestricted2from being imported inmodule1andrestricted3andrestricted4from being imported inmodule2:module1:restricted1;restricted2,module2:fordibben3;restricted4RecursionYou can enable the transitive detection of restricted imports, however this takes a lot
more compute.For example, if have the following files:# flask_app.py
import flask
import common_utils

# common_utils.py
import djangoIfflask_appis not allowed to import django, the transitive checker would throw an error
because importingcommon_utilswould causedjangoto be imported, which is restricted.
Package: pylint-runner
A simple pylint application that scans the current directory and any sub-directories recursively,
then runs pylint on all discovered.pyfiles.Dependenciescoloramapylintpytest(for testing)InstallationPreferred installation method:pip install pylint_runnerFrom source:python setup.py installWhen installed, this will create an executablepylint_runner,pylint_runner#, andpylint_runner#.#where the first # represents the major version of Python (2 or 3) and the second # represents the minor
version of Python. So if installed by Python 2.7, you will have availablepylint_runner,pylint_runner2,
andpylint_runner2.7so as to allow usage by however many installed versions of python on the system as
pylint is version dependent on its output (due to using the Python AST).Usagepylint_runnerOutput is standard pylint output. There should be no output if no issues were found.In case of issues, you should see output similar to:************* Module foo.bar
C: 24, 0: Missing function docstring (missing-docstring)
************* Module tests.foo_tester
C: 19, 0: Final newline missing (missing-final-newline)
C: 19, 0: Invalid constant name "a" (invalid-name)Additional ArgumentsSee the standard help ouput:pylint_runner -hNOTE:Unused options and arguments will be passed directly to pylint. For example,
doingpylint_runner -d C0103 -d E0602will causepylint -d C0103 -d E0602on each file.Verbose modepylint_runner -vVerbose mode lists all files that were found for testing immediately, along with the pylint output.This will generate (if run against this repo):Using pylint 1.6.5 for python 2.7.11
pylint running on the following files:
- pylint_runner/__init__.py
- pylint_runner/main.py
- setup.py
- tests/__init__.py
- tests/test_runner.py
- tests/tests/dummy.py

************* Module tests.test_runner
I:  1, 0: Locally disabling missing-docstring (C0111) (locally-disabled)rcfileThis allows you to specify a pylintrc file to be used using–rcfile path_to_file.It may be a relative, or absolute path and defaults to.pylintrcat the current working directory.It will read the value ofignorefrom the rcfile and ignore any matching files/folders while building the list of
files to pass to python.It will also pass that rcfile for use by pylint.