Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lesson Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
prace-lessons
Lesson Template
Commits
f63c9a9e
Commit
f63c9a9e
authored
8 years ago
by
Greg Wilson
Browse files
Options
Downloads
Patches
Plain Diff
Fixing types
parent
41f5bfed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/check-lesson
+2
-2
2 additions, 2 deletions
bin/check-lesson
bin/util.py
+3
-3
3 additions, 3 deletions
bin/util.py
with
5 additions
and
5 deletions
bin/check-lesson
+
2
−
2
View file @
f63c9a9e
...
...
@@ -228,7 +228,7 @@ class CheckBase(object):
cls
=
self
.
get_val
(
node
,
'
attr
'
,
'
class
'
)
self
.
reporter
.
check
(
cls
in
KNOWN_BLOCKQUOTES
,
(
self
.
filename
,
self
.
get_loc
(
node
)),
'
Unknown or missing blockquote type {0}
in {1}:{2}
'
,
'
Unknown or missing blockquote type {0}
'
,
cls
)
...
...
@@ -239,7 +239,7 @@ class CheckBase(object):
cls
=
self
.
get_val
(
node
,
'
attr
'
,
'
class
'
)
self
.
reporter
.
check
(
cls
in
KNOWN_CODEBLOCKS
,
(
self
.
filename
,
self
.
get_loc
(
node
)),
'
Unknown or missing code block type {0}
in {1}:{2}
'
,
'
Unknown or missing code block type {0}
'
,
cls
)
...
...
This diff is collapsed.
Click to expand it.
bin/util.py
+
3
−
3
View file @
f63c9a9e
...
...
@@ -29,11 +29,11 @@ class Reporter(object):
def
add
(
self
,
location
,
fmt
,
*
args
):
'''
Append error unilaterally.
'''
if
typ
e
(
location
)
is
NoneType
:
if
isinstanc
e
(
location
,
type
(
None
))
:
extra
=
''
elif
typ
e
(
location
)
is
str
:
elif
isinstanc
e
(
location
,
str
)
:
extra
=
'
at {0}
'
.
format
(
filename
)
elif
typ
e
(
location
)
is
tuple
:
elif
isinstanc
e
(
location
,
tuple
)
:
filename
,
line_number
=
location
extra
=
'
at {0}:{1}
'
.
format
(
*
location
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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