def read_entries(fileobj):
    """
    Reads environment variable assignments from a file-like object. Only lines that
    contain an equal sign (=) and do not start with # (comments) are considered. Any
    leading/trailing quotes around the value portion of the assignment are stripped.
    """
    entries = {}
    for line in fileobj.readlines():
        line = line.strip()
        if "=" in line and not line.startswith("#"):
            key, value = line.split("=", 1)
            entries[key.strip()] = value.strip().strip("\"'")
    return entries