Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pytools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pytools
Commits
3ce7e4e2
Commit
3ce7e4e2
authored
4 years ago
by
Nicholas Christensen
Browse files
Options
Downloads
Patches
Plain Diff
more lowercase variables
parent
1f94b148
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pytools/tag.py
+6
-6
6 additions, 6 deletions
pytools/tag.py
with
6 additions
and
6 deletions
pytools/tag.py
+
6
−
6
View file @
3ce7e4e2
...
@@ -167,21 +167,21 @@ class Taggable:
...
@@ -167,21 +167,21 @@ class Taggable:
def
_check_uniqueness
(
self
):
def
_check_uniqueness
(
self
):
class_set
=
set
()
class_set
=
set
()
def
_check_recursively
(
in
C
lass
,
class_set
):
def
_check_recursively
(
in
_c
lass
,
class_set
):
# Termination condition
# Termination condition
if
issubclass
(
in
C
lass
,
UniqueTag
)
and
in
C
lass
is
not
UniqueTag
:
if
issubclass
(
in
_c
lass
,
UniqueTag
)
and
in
_c
lass
is
not
UniqueTag
:
if
in
C
lass
in
class_set
:
if
in
_c
lass
in
class_set
:
error_string
=
(
"
Two or more Tags are instances of {}.
"
error_string
=
(
"
Two or more Tags are instances of {}.
"
"
A Taggable object can only instantiate with one
"
"
A Taggable object can only instantiate with one
"
"
instance of each UniqueTag sub-class.
"
).
format
(
"
instance of each UniqueTag sub-class.
"
).
format
(
in
C
lass
.
__name__
)
in
_c
lass
.
__name__
)
raise
ValueError
(
error_string
)
raise
ValueError
(
error_string
)
else
:
else
:
class_set
.
add
(
in
C
lass
)
class_set
.
add
(
in
_c
lass
)
# Recurse to all superclasses
# Recurse to all superclasses
for
c
in
in
C
lass
.
__bases__
:
for
c
in
in
_c
lass
.
__bases__
:
_check_recursively
(
c
,
class_set
)
_check_recursively
(
c
,
class_set
)
for
tag
in
self
.
tags
:
for
tag
in
self
.
tags
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment