from typing import Optional
import ast


def find_first_import(file_path: str) -> Optional[int]:
    """
    Returns the line number of the first import statement in the file.
    If there are no import statements, returns None
    """
    with open(file_path) as f:
        source = f.read()

    tree = ast.parse(source, file_path)

    # finds first line with an import statement
    first_import = None
    for node in ast.walk(tree):
        if isinstance(node, ast.Import):
            first_import = node.lineno
            break

    return first_import