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
c22955d1
Commit
c22955d1
authored
10 years ago
by
Raniere Silva
Browse files
Options
Downloads
Plain Diff
Merge pull request #110 from abought/check_py
Make validator imports more pythonic
parents
fab53323
d1378e3a
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
tools/check.py
+1
-15
1 addition, 15 deletions
tools/check.py
tools/test_check.py
+1
-4
1 addition, 4 deletions
tools/test_check.py
with
2 additions
and
19 deletions
tools/check
→
tools/check
.py
+
1
−
15
View file @
c22955d1
...
...
@@ -20,21 +20,7 @@ import os
import
re
import
sys
try
:
# Code tested with CommonMark version 0.5.4; API may change
import
CommonMark
except
ImportError
:
ERROR_MESSAGE
=
"""
This program requires the CommonMark python package.
Install using
# pip install commonmark
or
# easy_install commonmark
"""
print
(
ERROR_MESSAGE
)
sys
.
exit
(
1
)
import
CommonMark
import
validation_helpers
as
vh
...
...
This diff is collapsed.
Click to expand it.
tools/test_check.py
+
1
−
4
View file @
c22955d1
...
...
@@ -7,14 +7,11 @@ Some of these tests require looking for example files, which exist only on
the gh-pages branch. Some tests may therefore fail on branch
"
core
"
.
"""
import
imp
import
logging
import
os
import
unittest
check
=
imp
.
load_source
(
"
check
"
,
# Import non-.py file
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
check
"
))
import
check
# Make log messages visible to help audit test failures
check
.
start_logging
(
level
=
logging
.
DEBUG
)
...
...
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