Hey all :wave: I'm a recent `pants` convert :sweat...
# general
p
Hey all 👋 I'm a recent
pants
convert 😅 Looking at taking my existing
pylint
flow over to
pants
, and I'm getting stuck with my
[SPELLING]
configuration. Currently, running
./pants lint ::
will error with
optparse.OptionValueError: option spelling-dict: invalid value: 'en_US', should be in ['']
despite having the
enchant
library installed through
brew
👖 1
FWIW, I'm running on an M1 macbook, in case that makes a difference
This works with my local
pylint
, but when trying to run with
./pants lint
, it doesn't seem to be able to find the dictionary
e
Pants tries very very hard to ignore your environment. Just because you have brewed something, you can be sure someone else working on the project will not.
So, you need to get Pants involved with enchant
p
Which is exactly the problem I'm trying avoid! And one of the great reasons I love
pants
😄
e
So what the heck is an enchant?
😆 1
p
So, Pants needs to natively support enchant? Or can I "hack it in" through one of the
pylint
configuration options? https://www.pantsbuild.org/docs/reference-pylint
It's just a spelling dictionary...it lets
pylint
perform spellchecks in my code
e
See that there?: http://pyenchant.github.io/pyenchant/install.html#apple-silicon-related-errors That's alot of M1 advice that involves env vars. Like all else isolationist, Pants will try to ignore your env vars. You need to poke holes for the critical ones so Pants subprocesses can see them.
Pants doesn't currently support
.env
files for injecting env variance. That would be useful here - m1 people need these env vars, others do not. That's coming but just not available quite yet; so you'll need to poke this hole for all users 😕
p
Thank you 🙏 It definitely sounds like I need to play around with this some more, but it sounds like...with enough fiddling...I might get this to work 😉
e
Yeah, just stick to the theme of understanding exactly how the thing you want works - the details - and almost always the answer is the details need to be explained to Pants to open up its hermeticity jails.