From ea4d10ec4e2b9704fc14bfe39437d583cc768344 Mon Sep 17 00:00:00 2001 From: carlio Date: Wed, 2 Dec 2015 05:45:55 +0800 Subject: [PATCH] Tidying up various code warnings and smells --- .landscape.yaml | 3 ++- README.md | 3 +-- pylint_django/augmentations/__init__.py | 1 + pylint_django/transforms/__init__.py | 2 +- scripts/travis_skip.py | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.landscape.yaml b/.landscape.yaml index 969947e2..4b8bab3a 100644 --- a/.landscape.yaml +++ b/.landscape.yaml @@ -4,4 +4,5 @@ strictness: high doc-warnings: no max-line-length: 120 ignore-paths: - - ^scripts/ + - scripts/ + - pylint_django/compat.py diff --git a/README.md b/README.md index 140550cc..e1a5da6d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ pylint-django [![Build Status](https://travis-ci.org/landscapeio/pylint-django.png?branch=master)](https://travis-ci.org/landscapeio/pylint-django) [![Code Quality](https://landscape.io/github/landscapeio/pylint-django/master/landscape.png)](https://landscape.io/github/landscapeio/pylint-django) [![Coverage Status](https://coveralls.io/repos/landscapeio/pylint-django/badge.png)](https://coveralls.io/r/landscapeio/pylint-django) -[![Latest Version](https://pypip.in/v/pylint-django/badge.png)](https://crate.io/packages/pylint-django) -[![Downloads](https://pypip.in/d/pylint-django/badge.png)](https://crate.io/packages/pylint-django) +[![Latest Version](https://img.shields.io/pypi/v/pylint-django.svg)](https://pypi.python.org/pypi/pylint-django) # About diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py index b3b0f43c..61600f24 100644 --- a/pylint_django/augmentations/__init__.py +++ b/pylint_django/augmentations/__init__.py @@ -1,4 +1,5 @@ """Augmentations.""" +# pylint: disable=invalid-name from pylint.checkers.base import DocStringChecker, NameChecker from pylint.checkers.design_analysis import MisdesignChecker from pylint.checkers.classes import ClassChecker diff --git a/pylint_django/transforms/__init__.py b/pylint_django/transforms/__init__.py index 96d01018..25cae971 100644 --- a/pylint_django/transforms/__init__.py +++ b/pylint_django/transforms/__init__.py @@ -26,7 +26,7 @@ def set_fake_locals(module): if module.name != package_name: return for class_name in class_names: - module._locals[class_name] = fake._locals[class_name] + module._locals[class_name] = fake._locals[class_name] # pylint: disable=protected-access MANAGER.register_transform(nodes.Module, set_fake_locals) diff --git a/scripts/travis_skip.py b/scripts/travis_skip.py index f4675a37..8b0932b3 100755 --- a/scripts/travis_skip.py +++ b/scripts/travis_skip.py @@ -1,5 +1,6 @@ #!/usr/bin/env python -import os, sys +import os +import sys for skip_ver in os.environ.get('SKIP', '').split(): skip_ver = tuple(map(int, skip_ver.split('.'))) if skip_ver == sys.version_info[:len(skip_ver)]: