CI: Add test case for unwanted patterns
- [x] closes #30454
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Can be merged, after merging #30464
This is really nice, thanks @MomIsBestFriend.  I was _not_ looking forward to figuring out the `ast` stuff.

@datapythonista is there someone on one of the flake/lint projects we might want to talk to about upstreaming this? This is really nice, thanks @MomIsBestFriend.  I was _not_ looking forward to figuring out the `ast` stuff.

@datapythonista is there someone on one of the flake/lint projects we might want to talk to about upstreaming this? @datapythonista It's looking like the running version of python in github's action is ```2.7.15```, is it possible to increase it?
 > @datapythonista It's looking like the running version of python in github's action is `2.7.15`, is it possible to increase it?

Where does it say this out of interest? It must be at least 3.6 as we run `validate_docstring.py` in github actions? > > @datapythonista It's looking like the running version of python in github's action is `2.7.15`, is it possible to increase it?
> 
> Where does it say this out of interest? It must be at least 3.6 as we run `validate_docstring.py` in github actions?

Line 52 in the github actions under ```Looking for unwanted patterns``` section.

![python_version_github_actions](https://user-images.githubusercontent.com/50263213/71488539-c6111580-2829-11ea-9d46-480b2744d315.png)

(Screenshot because I squashed the original commit) We never use the system python, we install conda in every build, and create an environment, you'll have to activate it.

I'd yield the values as a namedtuple.  > and create an environment, you'll have to activate it.


The problem is, the activation of conda is happening after it's running the unwanted patterns check. Do you have any suggestions? Better move the string thing in the linting, which is a good idea anyway.  Can be merged after merging #30579 Merged #30579, you can update your branch, so the CI passes Thank you for the very close guidance @datapythonista  thanks @MomIsBestFriend 