Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix .travis.yml #795

Merged
merged 5 commits into from
Sep 25, 2020
Merged

fix .travis.yml #795

merged 5 commits into from
Sep 25, 2020

Conversation

noviluni
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #795 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #795   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files         231      231           
  Lines        2520     2520           
=======================================
  Hits         2479     2479           
  Misses         41       41           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb194c4...c5bdb11. Read the comment docs.

setup.py Outdated
@@ -1,7 +1,7 @@
import re
from setuptools import setup, find_packages

__version__ = re.match(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read())[1]
__version__ = re.findall(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read())[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, but this might also work and be closer to the original code:

Suggested change
__version__ = re.findall(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read())[0]
__version__ = re.search(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read())[1]

re.match is basically re.search with an implicit ^ in the pattern.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. The problem is indeed the syntax. Today I learn that is specific to 3.6+.

What about using the old syntax equivalent, .group(1)?

@noviluni noviluni merged commit aced969 into scrapinghub:master Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants