Skip to content
Branch: master
Commits on Oct 17, 2019
  1. Update the Python versions tested

    pgjones committed Oct 17, 2019
    3.4 has reached EOL, and 3.8 has been released.
Commits on Mar 4, 2019
  1. Bump and release 0.18.1

    pgjones committed Mar 4, 2019
Commits on Jul 8, 2018
  1. Bump to 0.18

    pgjones committed Jul 8, 2018
  2. Add Python 3.7 CI testing

    pgjones committed Jul 8, 2018
    This requires a more complex travis.yml as 3.7 is not supported in the
    default image (as yet). Therefore xenial is used and requires sudo
    (I'm not sure why).
Commits on Mar 5, 2018
  1. Bump to 0.17.1

    pgjones committed Mar 5, 2018
Commits on Feb 11, 2018
  1. Bump to 0.17

    pgjones committed Feb 11, 2018
Commits on Jan 7, 2018
  1. Fix minor typo

    pgjones committed Jan 7, 2018
  2. Alter edited style definition

    pgjones committed Dec 9, 2017
    The relative import and application imports should not be considered
    the same section.
  3. Allow styles an ability to override the actual checks

    pgjones committed Nov 24, 2017
    This is specifically helpful to allow the edited style to have an
    optional newline between ``import`` and ``form X import`` lines
    without triggering a I202 error.
    In a more general sense this should allow for more advanced styles.
Commits on Dec 28, 2017
  1. Further update import explanation

    pgjones committed Dec 28, 2017
    This should make the full import clearer (as it is now fully
    reported), as well as continue the lazy evaluation.
Commits on Dec 13, 2017
  1. Improve the error messages and typing

    pgjones committed Dec 13, 2017
    This hopefully makes the errors clearer to the user, thereby allowing
    them to better understand how to fix the error. As it explains the
    sections determined and will note if the section is wrong when
    considering the relative ordering.
    This also uses a Enum for convenience, which in turn improves the type
Commits on Nov 26, 2017
  1. Bump to 0.16

    pgjones committed Nov 26, 2017
  2. Clarify a limitation of the I202 check

    pgjones committed Nov 26, 2017
    Notably that the I202 check does not understand the context other than
    imports and newlines.
  3. A few cosmetic changes to c86f28a

    pgjones committed Nov 26, 2017
    These make a few minor changes to match the codebase (and maintainers)
    preferences. It also removes obsolete code and clarifies the
Commits on Nov 20, 2017
  1. Understand namespace packages

    pgjones committed Nov 16, 2017
    This change means that the root package name is never considered to a
    namespace package, but rather the root package. This shouldn't make
    any difference in normal usage, however it allows for one namespaced
    package to be local and another third party.
    This change only works in Python3 as I'm unsure how to find a module's
    spec in Python2. A Python2 compatible method of importing the package
    and testing for the namespace properties was rejected due to the
    likely performance cost and due to concerns about import side
    affects. I don't intend to support Python2 for many more releases so
    this is an acceptable compromise.
Commits on Nov 15, 2017
  1. Change determination of spacing

    pgjones committed Nov 15, 2017
    This ensures that a newline space is only considered to be a blank
    line i.e. newline. It prevents things like comments or a try/except
    triggering a spacing error (or not triggering for I201).
    It does so by considering import and newline nodes, which is a change
    to how the style checkers work and hence it can break custom styles if
    they consider the nodes directly (most do not).
    It allows asttokens to be dropped as a dependency as the end of the
    statement is no longer required (as the checker knows where the newlines
    are instead).
Commits on Nov 6, 2017
  1. Bump to 0.15

    pgjones committed Nov 6, 2017
Commits on Nov 5, 2017
  1. Update the limitations section

    pgjones committed Nov 5, 2017
    The I201 limitation no longer applies with the usage of asttokens and
    14.2. The I100 limitation follows on from discussion on github and
    reports the current state of the checker.
Commits on Nov 4, 2017
  1. Support inline noqa specifying codes to ignore

    pgjones committed Nov 4, 2017
    This adds support for inline noqa directives such as `# noqa: I101` to
    ignore only the I101 code.
    This uses code taken from flake8. Note that this plugin should not
    depend on flake8 to better support the PyLama usage.
  2. Correct the entry point

    pgjones committed Nov 4, 2017
    The plugin reports errors starting with `I` and not specifically `I10`
    for example `I201`. This may result in previously unreported I2XX
    errors now being reported.
  3. Remove Python 3.3 testing

    pgjones committed Oct 30, 2017
    As Python 3.3 reached its end of life last month.
Commits on Nov 1, 2017
  1. Bump to 0.14.3

    pgjones committed Nov 1, 2017
Commits on Oct 31, 2017
  1. Fix noqa acceptance

    pgjones committed Oct 31, 2017
    As the I202 error requires knowledge of the previous import to work it
    is necessary not to remove the noqa lines before checking the style,
    and instead check after (as this patch does). This should remove errors
    such as,
        import A
        # some comment
        import B
        import C
    the 3rd line will trigger a I202 error due to the comment, which can
    be ignored. However with the previous version this would cause line 4
    to also raise a I202 as only import A and import C will be style
Commits on Oct 30, 2017
  1. Bump to 0.14.2

    pgjones committed Oct 30, 2017
  2. Fix no invocation bug and asttokens usage

    pgjones committed Oct 30, 2017
    Without a `tree` argument to the flake8 linter the plugin is not
    invoked and silently does nothing, which indicates to the user that
    the linting passed (although nothing happened).
    Whilst fixing this I noticed the asttokens usage was a bit rushed and
    not only was the ast tree useful, the asttokens marked tree was
    created in an unclear way (is it really part of the load file?). This
    was also fixed.
Commits on Oct 27, 2017
  1. Bump to 0.14.1

    pgjones committed Oct 27, 2017
Commits on Oct 26, 2017
  1. Fix I202 bug with multiline imports

    pgjones committed Oct 26, 2017
    Previously any multiline import would be considered as taking up a
    single line. This would cause the linter to assume there are
    additional newlines and hence raise an I202 error. For example
        from X import A, a, \
            B, b
        from Y import A
    would raise an I202 on the 3rd line.
    To fix this it is required to know the line of the final token in the
    import. The final token is key due to paranthesis for example,
        from X import (
            A, a, B, b,
        from Y import A
    the first three lines are all the same import.
    As the stdlib ast module cannot provide the final token location, the
    asttokens package is used.
Commits on Oct 24, 2017
  1. Bump to 0.14

    pgjones committed Oct 24, 2017
Commits on Sep 5, 2017
  1. Add I202 error, an additional newline in import section

    pgjones committed Aug 13, 2017
    As newlines indicate a change in import sections, additional newlines
    or spacings within the same section are missleading. This commit makes
    such an additional spacing raise an I202 error.
  2. Fix cryptography same_section check

    pgjones committed Aug 13, 2017
    The cryptography first party (application imports) should be grouped
    together by packages and with all the relative imports grouped
    together. The previous version would not correctly enforce this, due
    to a poorly definition of relative imports (including non-relative
    first party). The standard style same section check is also updated to
    make it clear that it is both first party, not both relative that
Commits on Jul 29, 2017
  1. Bump to 0.13

    pgjones committed Jul 29, 2017
Commits on Jul 22, 2017
  1. Test error case if an unknown style is configured

    pgjones committed Jul 15, 2017
  2. Allow for any style to use application-package grouping

    pgjones committed Jul 15, 2017
    This allows for a style to state if accepts application-package
    grouping, by setting ``accepts_application_package_names`` to True. In
    order to make this clear the README has been re-written.
    This closes #109.
Commits on Apr 6, 2017
  1. Improve travis and tox build

    pgjones committed Apr 6, 2017
    This will hopefully add Python3.6 testing as well as simplify the
    travis management via the tox-travis tool.
Commits on Feb 11, 2017
  1. Bump to 0.12

    pgjones committed Feb 11, 2017
You can’t perform that action at this time.