-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Feature property fqdn #126
Feature property fqdn #126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I like it!
Not sure what's going on with Travis. I'll tinker this weekend.
tldextract/tldextract.py
Outdated
'' | ||
""" | ||
if self.domain and self.suffix: | ||
return '.'.join([i for i in [self.subdomain, self.domain, self.suffix] if i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can save 2 lists with '.'.join(i for i in self if i)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still working on tests.
i will gladly add this change, but i thought being explicit would be better for reading/maintenance.
Rebase atop latest master. That should fix Travis. |
e796bb3
to
ab707a6
Compare
ab707a6
to
9ad0f46
Compare
can you share any info on how you run/setup the tox tests under python 2.7 ? I tried writing tests and running tox as described in the docs -- and it's collecting 2k+ tests and jamming my box. looking at the travis build for this, it looks like the python 2.7 tests may be running under python 3 too. i won't have time to investigate more until the weekend, so just wanted to bring it up here in case you know of something that I'm missing. |
|
That's the command that is collecting 2k+ tests for me with Python 2.7 -- with or without a fresh virtual env.
That didn't happen under python 3 though, which is what puzzles me.
|
Hmm. I'm not seeing that. $ python --version
Python 2.7.13
~/S…/tldextract $ tox -e py27-requests-current -- --collect-only 2>&1 | grep collected
collected 46 items
~/S…/tldextract $ tox -e py36-requests-current -- --collect-only 2>&1 | grep collected
collected 34 items |
thanks for humoring me on this. tox seems to be broken on this build of OSX. i'm running 2.7 tests on an ubuntu box fine now. |
replaced the inner loop on `fqdn()` function with `self` as it's just the namedtuple instance's fields in order
b5e9d88
to
5d54eb6
Compare
Ok. changes made and tests added. Sorry for the travis overload - I did most of my work in a different branch and merged back to avoid issues... then had to reorganize the tests to make them pass. The test reorganization is pretty simple. Tox doesn't want to see more than 5 args per function. instead of changing the rule, I slightly altered the way |
Wow! So exhaustive! I'd have been fine with the doctest but this is great. 😋 Thank you! |
this is a suggestion for a convenience function