`astro dev parse` does not properly read file names from `dag_integrity_exceptions.txt`

Describe the bug

When running astro dev parse, filenames listed in dag_integrity_exceptions.txt are not properly stored in the exceptions variable when the exceptions file is read in the test_file_imports function. Newline characters are not ignored and therefore any filename with a newline after it does not match the name of the file that threw the exception.

.astro/test_dag_integrity_default.py:138: Exception
----------------------------- Captured stdout call -----------------------------
Exceptions: ['# Add dag files to exempt from parse test below. ex: dags/<test-file>\n', 'dags/dbt_analytics_adjustments_straightline.py\n', 'dags/dbt_analytics_amplitude.py\n', 'dags/dbt_analytics_daily_build.py\n', 'dags/dbt_analytics_tier_1_updates.py']
=========================== short test summary info ============================
FAILED .astro/test_dag_integrity_default.py::test_file_imports[dags/dbt_analytics_daily_build.py]
FAILED .astro/test_dag_integrity_default.py::test_file_imports[dags/dbt_analytics_adjustments_straightline.py]
FAILED .astro/test_dag_integrity_default.py::test_file_imports[dags/dbt_analytics_amplitude.py]
========================= 3 failed, 35 passed in 9.16s =========================
DEBU[0022] Error starting pytest container: failed to execute cmd: exit status 1 
Error: See above for errors detected in your DAGs

What CLI Version did you experience this bug?

1.36.0

This CLI bug is related to which Astronomer Platform?

  • Astro
  • Software
  • None/Unknown

What Operating System is the above CLI installed on?
Mac OS Sequoia 15.7.1

🪜 Steps To Reproduce

  1. Have a DAG in your project that doesn't parse correctly (in my case, dbt DAG where the dbt code is in a separate repo and the dbt project/manifest etc. hasn't been configured yet)
  2. Add the name of that DAG to your dag_integrity_exceptions.txt file (with a newline after)
  3. Run astro dev parse
  4. See error similar to what's reported here

📸 Screenshots