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

Support wildcards in module ignores (#103) #106

Merged
merged 1 commit into from
Sep 21, 2021
Merged

Support wildcards in module ignores (#103) #106

merged 1 commit into from
Sep 21, 2021

Conversation

seddonym
Copy link
Owner

@seddonym seddonym commented Sep 2, 2021

This supports the use of wildcards in the ignore_imports of contracts.

@seddonym seddonym force-pushed the wildcards branch 2 times, most recently from 58424fa to 6ce03c8 Compare September 3, 2021 10:53
@@ -2,25 +2,6 @@
Contract types
==============

.. _Shared options:
Copy link
Owner Author

Choose a reason for hiding this comment

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

I thought this worked better at the bottom.

@@ -136,7 +136,35 @@ def test_ignore_imports_tolerates_duplicates(self):
),
include_external_packages=False,
)
assert contract.check(graph=graph)
Copy link
Owner Author

Choose a reason for hiding this comment

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

This was a bug in the test, corrected.

@@ -15,6 +15,34 @@
(testpackage_directory, ".brokencontract.ini", cli.EXIT_STATUS_ERROR),
(testpackage_directory, ".malformedcontract.ini", cli.EXIT_STATUS_ERROR),
(testpackage_directory, ".customkeptcontract.ini", cli.EXIT_STATUS_SUCCESS),
(testpackage_directory, ".externalbrokencontract.ini", cli.EXIT_STATUS_ERROR),
Copy link
Owner Author

Choose a reason for hiding this comment

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

I've reordered the tests here so that the TOML ones were together. I also added a couple of tests for the TOML version of setup.cfg so we can make sure the wildcards are ok in that format.

@seddonym
Copy link
Owner Author

Dear oh dear, Travis builds have stopped working because I have run out of credits. I thought it was free for open source. I have contacted Travis support but by the sound of it I might be waiting a long time, we'll see.

@seddonym
Copy link
Owner Author

@kasium fancy giving this a review? I have squashed your original work into the first commit and have added tests (and a couple of tweaks).

@kasium
Copy link
Contributor

kasium commented Sep 17, 2021

So I looked thru it and it seems fine to me

@seddonym
Copy link
Owner Author

Great, thanks! This is now only blocked by Travis CI so hopefully they will get back to me soon.

Support wildcards in module ignores
@seddonym seddonym merged commit 67a7707 into master Sep 21, 2021
@seddonym seddonym deleted the wildcards branch September 21, 2021 09:19
@seddonym
Copy link
Owner Author

Travis actually got back to me same day 🥳

@seddonym
Copy link
Owner Author

This is now released in Import Linter version 1.2.5. Thanks again for all your help.

@kasium
Copy link
Contributor

kasium commented Sep 21, 2021

Thanks a lot 😄

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