Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKevJames committed Nov 11, 2021
1 parent 2610885 commit 48f0ac0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions coveralls/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def load_config_from_buildkite():

@staticmethod
def load_config_from_circle():
number = os.environ.get(
'CIRCLE_WORKFLOW_ID') or os.environ.get('CIRCLE_BUILD_NUM')
pr = (os.environ.get('CI_PULL_REQUEST') or "").split("/")[-1] or None
job = os.environ.get('CIRCLE_NODE_INDEX') or None
number = (os.environ.get('CIRCLE_WORKFLOW_ID')
or os.environ.get('CIRCLE_BUILD_NUM'))
pr = (os.environ.get('CI_PULL_REQUEST') or '').split('/')[-1] or None
job = os.environ.get('CIRCLE_NODE_INDEX')
return 'circleci', job, number, pr

def load_config_from_github(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/api/configuration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def test_circleci_singular_no_config(self):
def test_circleci_parallel_no_config(self):
cover = Coveralls(repo_token='xxx')
assert cover.config['service_name'] == 'circleci'
assert cover.config['service_number'] == '0ea2c0f7-4e56-4a94-bf77-bfae6bdbf80a'
assert cover.config['service_number'] == (
'0ea2c0f7-4e56-4a94-bf77-bfae6bdbf80a')
assert cover.config['service_job_id'] == '15'

@mock.patch.dict(
Expand Down

0 comments on commit 48f0ac0

Please sign in to comment.