GithubHelp home page GithubHelp logo

haaleo / pylint-file-header Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 3.0 60 KB

Pylint plugin to enforce consistent file/module header

License: MIT License

Python 100.00%
file-header pylint pylint-plugin pypi python

pylint-file-header's Introduction

Hi there ๐Ÿ‘‹๐Ÿผ

LinkedIn Mail Stackoverflow Gitter

I'm Leo, I got a computer science degree in Robotics, Cognition, Intelligence at the Technical University of Munich. The topic of my master's thesis is whether and to what extent it is possible to identify vague requirements with machine learning. Here you find the implementation and the thesis is located here.

I am here to contribute to awesome projects and to stay in touch with the open source community.

Favorite Languages and Tools

GitHub Statistics

Leo's github stats

pylint-file-header's People

Contributors

haaleo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

pylint-file-header's Issues

Ignoring empty files like __init__.py

Is your feature request related to a problem? Please describe.
Ignoring the empty files, like __init__.py

Describe the solution you'd like
Add a configuration option file-header-ignore-empty to ignore if file is empty

Describe alternatives you've considered
I didn't find a good solution to ignore only empty files in pylint, adding all the files to ignore is too much of work

[DOCS] Plugin not running in Github Actions workflow

Python Version Pylint Version pylintfileheader Version
3.9 pulled from Github actions 0.3.2

Description

The pylintfileheader plugin is evidently not running in a Github Actions workflow despite being installed successfully during the workflow and set as a plugin in linter.yml.

Expected Behavior

The plugin runs.

Steps to Reproduce

  1. Install the package with pip in a run command in linter.yml.
  2. Define pylintfileheader as a plugin.
  3. Use file-header-path=pylint.header to define the header.

Settings



analyse-fallback-blocks=no
#enable-all-extensions=
#errors-only=
#exit-zero=
extension-pkg-allow-list=
extension-pkg-whitelist=
fail-on=
fail-under=10
#from-stdin=
ignore=CVS
ignore-paths=
ignore-patterns=^\.#
ignored-modules=
#init-hook=
jobs=1
limit-inference-results=100
load-plugins=pylintfileheader
file-header-path=pylint.header
persistent=yes
py-version=3.9
recursive=no
suggestion-mode=yes
unsafe-load-any-extension=no
#verbose=
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
msg-template=
#output-format=
reports=no
score=yes
confidence=HIGH,
           CONTROL_FLOW,
           INFERENCE,
           INFERENCE_FAILURE,
           UNDEFINED
disable=raw-checker-failed,
        bad-inline-option,
        locally-disabled,
        file-ignored,
        suppressed-message,
        useless-suppression,
        deprecated-pragma,
        use-symbolic-message-instead
enable=c-extension-no-member
logging-format-style=old
logging-modules=logging
max-spelling-suggestions=4
spelling-dict=
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
spelling-ignore-words=
spelling-private-dict-file=
spelling-store-unknown-words=no
notes=FIXME,
      XXX,
      TODO
notes-rgx=
contextmanager-decorators=contextlib.contextmanager
generated-members=
ignore-none=yes
ignore-on-opaque-inference=yes
ignored-checks-for-mixins=no-member,
                          not-async-context-manager,
                          not-context-manager,
                          attribute-defined-outside-init
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
missing-member-hint=yes
missing-member-hint-distance=1
missing-member-max-choices=1
mixin-class-rgx=.*[Mm]ixin
signature-mutators=
check-protected-access-in-special-methods=no
defining-attr-methods=__init__,
                      __new__,
                      setUp,
                      __post_init__
exclude-protected=_asdict,
                  _fields,
                  _replace,
                  _source,
                  _make
valid-classmethod-first-arg=cls
valid-metaclass-classmethod-first-arg=cls
additional-builtins=
allow-global-unused-variables=yes
allowed-redefined-builtins=
callbacks=cb_,
          _cb
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
ignored-argument-names=_.*|^ignored_|^unused_
init-import=no
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
expected-line-ending-format=
ignore-long-lines=^\s*(# )??$
indent-after-paren=4
indent-string='    '
max-line-length=100
max-module-lines=1000
single-line-class-stmt=no
single-line-if-stmt=no
allow-any-import-level=
allow-wildcard-with-all=no
deprecated-modules=
ext-import-graph=
import-graph=
int-import-graph=
known-standard-library=
known-third-party=enchant
preferred-modules=
overgeneral-exceptions=BaseException,
                       Exception
max-nested-blocks=5
never-returning-functions=sys.exit,argparse.parse_error
ignore-comments=yes
ignore-docstrings=yes
ignore-imports=yes
ignore-signatures=yes
min-similarity-lines=4
exclude-too-few-public-methods=
ignored-parents=
max-args=5
max-attributes=7
max-bool-expr=5
max-branches=12
max-locals=15
max-parents=7
max-public-methods=20
max-returns=6
max-statements=50
min-public-methods=2
check-quote-consistency=no
check-str-concat-over-line-jumps=no
argument-naming-style=snake_case
#argument-rgx=
attr-naming-style=snake_case
#attr-rgx=
bad-names=foo,
          bar,
          baz,
          toto,
          tutu,
          tata
bad-names-rgxs=
class-attribute-naming-style=any
#class-attribute-rgx=
class-const-naming-style=UPPER_CASE
#class-const-rgx=
class-naming-style=PascalCase
#class-rgx=
const-naming-style=UPPER_CASE
#const-rgx=
docstring-min-length=-1
function-naming-style=snake_case
#function-rgx=
good-names=i,
           j,
           k,
           ex,
           Run,
           _
good-names-rgxs=
include-naming-hint=no
inlinevar-naming-style=any
#inlinevar-rgx=
method-naming-style=snake_case
#method-rgx=
module-naming-style=snake_case
#module-rgx=
name-group=
no-docstring-rgx=^_
property-classes=abc.abstractproperty
#typevar-rgx=
variable-naming-style=snake_case
#variable-rgx=

Pylint-File-Header doesn't work with Pylint 3.0

Python Version Pylint Version pylintfileheader Version
3.9 3.0.0 0.3.2

Description

Given pylint's 3.0.0 release, IRawChecker was removed (I believe in this PR)

Expected Behavior

When running pylint, all imports succeed

Actual Behavior

  from pylintfileheader import plugin, file_header_checker  # noqa: F401
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylintfileheader/plugin.py", line 10, in <module>
  from pylintfileheader.file_header_checker import FileHeaderChecker
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylintfileheader/file_header_checker.py", line 9, in <module>
  from pylint.interfaces import IRawChecker
ImportError: cannot import name 'IRawChecker' from 'pylint.interfaces' (/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/interfaces.py)```


# Steps to Reproduce
<!-- Please add here all necessary steps that need to be taken to reproduce the behavior. -->
1. Install pylint (v3.0.0)
2. Install pylintfileheader
3. Run pylint
4. ImportError occurs

</code></pre></details>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.