Why is pytest giving me an "unrecognized option" error when I try and create a custom command line option?

I'm using Python 3.8 and pytest 6.0.1. How do I create a custom command line option for pytest? I thought it was as simple as adding this to conftest.py ...

def pytest_addoption(parser):
    parser.addoption('--option1', action='store_const', const=True)

but when I pytest, I get an unrecognized option error

# pytest --option1=Y -c tests/my_test.py 
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --option1=Y

What's the right way to add a custom option?