diff options
author | godaji <sipqko@gmail.com> | 2019-10-04 14:14:35 +0900 |
---|---|---|
committer | godaji <sipqko@gmail.com> | 2019-10-06 08:41:02 +0900 |
commit | c7ff676c11303a00da3a570bf2893717d0391f20 (patch) | |
tree | 3d8a784fe19fef852a3b64f619b0a6afc0273a99 | |
parent | ba2b60e32c12cacf18762a286d05e073529b9898 (diff) | |
download | gitlab-c7ff676c11303a00da3a570bf2893717d0391f20.tar.gz |
refactor: remove unused code, simplify string format
-rw-r--r-- | gitlab/base.py | 2 | ||||
-rw-r--r-- | gitlab/cli.py | 2 | ||||
-rw-r--r-- | gitlab/config.py | 2 | ||||
-rw-r--r-- | gitlab/tests/test_base.py | 3 |
4 files changed, 3 insertions, 6 deletions
diff --git a/gitlab/base.py b/gitlab/base.py index f81d039..a791db2 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -227,7 +227,7 @@ class RESTObjectList(object): class RESTManager(object): """Base class for CRUD operations on objects. - Derivated class must define ``_path`` and ``_obj_cls``. + Derived class must define ``_path`` and ``_obj_cls``. ``_path``: Base URL path on which requests will be sent (e.g. '/projects') ``_obj_cls``: The class of objects that will be created diff --git a/gitlab/cli.py b/gitlab/cli.py index 0ff2f22..26ea0c0 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -98,7 +98,7 @@ def _get_base_parser(add_help=True): "-c", "--config-file", action="append", - help=("Configuration file to use. Can be used " "multiple times."), + help="Configuration file to use. Can be used multiple times.", ) parser.add_argument( "-g", diff --git a/gitlab/config.py b/gitlab/config.py index 67301a0..4b4d6fd 100644 --- a/gitlab/config.py +++ b/gitlab/config.py @@ -63,7 +63,7 @@ class GitlabConfigParser(object): self.gitlab_id = self._config.get("global", "default") except Exception: raise GitlabIDError( - "Impossible to get the gitlab id " "(not specified in config file)" + "Impossible to get the gitlab id (not specified in config file)" ) try: diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py index 47eda6c..4aa280c 100644 --- a/gitlab/tests/test_base.py +++ b/gitlab/tests/test_base.py @@ -56,9 +56,6 @@ class TestRESTManager(unittest.TestCase): class Parent(object): id = 42 - class BrokenParent(object): - no_id = 0 - mgr = MGR(FakeGitlab(), parent=Parent()) self.assertEqual(mgr._computed_path, "/tests/42/cases") |